File tree 2 files changed +12
-6
lines changed
2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import RTCDataChannel from './RTCDataChannel.js';
4
4
import RTCIceCandidate from './RTCIceCandidate.js' ;
5
5
import { RTCDataChannelEvent , RTCPeerConnectionIceEvent } from './Events.js' ;
6
6
import RTCSctpTransport from './RTCSctpTransport.js' ;
7
- import DOMException from 'node-domexception' ;
7
+ import 'node-domexception' ;
8
8
9
9
export default class _RTCPeerConnection extends EventTarget {
10
10
static async generateCertificate ( ) {
11
- throw new Error ( 'Not implemented' ) ;
11
+ throw new DOMException ( 'Not implemented' ) ;
12
12
}
13
13
14
14
#peerConnection;
@@ -192,10 +192,6 @@ export default class _RTCPeerConnection extends EventTarget {
192
192
return this . #peerConnection. signalingState ( ) ;
193
193
}
194
194
195
- static generateCertificate ( keygenAlgorithm ) {
196
- throw new DOMException ( 'Not implemented' ) ;
197
- }
198
-
199
195
async addIceCandidate ( candidate ) {
200
196
if ( candidate == null || candidate . candidate == null ) {
201
197
throw new DOMException ( 'Candidate invalid' ) ;
Original file line number Diff line number Diff line change
1
+ import { expect } from '@jest/globals' ;
2
+ import polyfill from '../../polyfill/index.js' ;
3
+
4
+ describe ( 'polyfill' , ( ) => {
5
+ test ( 'generateCertificate should throw' , ( ) => {
6
+ expect ( async ( ) => {
7
+ await polyfill . RTCPeerConnection . generateCertificate ( { } ) ;
8
+ } ) . rejects . toEqual ( new DOMException ( 'Not implemented' ) ) ;
9
+ } ) ;
10
+ } ) ;
You can’t perform that action at this time.
0 commit comments