@@ -4,30 +4,30 @@ require('../common');
4
4
const { strictEqual, deepStrictEqual } = require ( 'assert' ) ;
5
5
6
6
{
7
- const domException = new DOMException ( 'no cause' , 'abc' ) ;
8
- strictEqual ( domException . name , 'abc' ) ;
9
- strictEqual ( 'cause' in domException , false ) ;
10
- strictEqual ( domException . cause , undefined ) ;
7
+ const domException = new DOMException ( 'no cause' , 'abc' ) ;
8
+ strictEqual ( domException . name , 'abc' ) ;
9
+ strictEqual ( 'cause' in domException , false ) ;
10
+ strictEqual ( domException . cause , undefined ) ;
11
11
}
12
12
13
13
{
14
- const domException = new DOMException ( 'with undefined cause' , { name : 'abc' , cause : undefined } ) ;
15
- strictEqual ( domException . name , 'abc' ) ;
16
- strictEqual ( 'cause' in domException , true ) ;
17
- strictEqual ( domException . cause , undefined ) ;
14
+ const domException = new DOMException ( 'with undefined cause' , { name : 'abc' , cause : undefined } ) ;
15
+ strictEqual ( domException . name , 'abc' ) ;
16
+ strictEqual ( 'cause' in domException , true ) ;
17
+ strictEqual ( domException . cause , undefined ) ;
18
18
}
19
19
20
20
{
21
- const domException = new DOMException ( 'with string cause' , { name : 'abc' , cause : 'foo' } ) ;
22
- strictEqual ( domException . name , 'abc' ) ;
23
- strictEqual ( 'cause' in domException , true ) ;
24
- strictEqual ( domException . cause , 'foo' ) ;
21
+ const domException = new DOMException ( 'with string cause' , { name : 'abc' , cause : 'foo' } ) ;
22
+ strictEqual ( domException . name , 'abc' ) ;
23
+ strictEqual ( 'cause' in domException , true ) ;
24
+ strictEqual ( domException . cause , 'foo' ) ;
25
25
}
26
26
27
27
{
28
- const object = { reason : 'foo' } ;
29
- const domException = new DOMException ( 'with object cause' , { name : 'abc' , cause : object } ) ;
30
- strictEqual ( domException . name , 'abc' ) ;
31
- strictEqual ( 'cause' in domException , true ) ;
32
- deepStrictEqual ( domException . cause , object ) ;
28
+ const object = { reason : 'foo' } ;
29
+ const domException = new DOMException ( 'with object cause' , { name : 'abc' , cause : object } ) ;
30
+ strictEqual ( domException . name , 'abc' ) ;
31
+ strictEqual ( 'cause' in domException , true ) ;
32
+ deepStrictEqual ( domException . cause , object ) ;
33
33
}
0 commit comments