@@ -17,30 +17,36 @@ const myError = new MyError('Some MyError');
17
17
// Test that native error object is correctly classed
18
18
assert . strictEqual ( test_error . checkError ( theError ) , true ,
19
19
'Error object correctly classed by napi_is_error' ) ;
20
-
20
+
21
21
// Test that native type error object is correctly classed
22
22
assert . strictEqual ( test_error . checkError ( theTypeError ) , true ,
23
23
'Type error object correctly classed by napi_is_error' ) ;
24
-
24
+
25
25
// Test that native syntax error object is correctly classed
26
26
assert . strictEqual ( test_error . checkError ( theSyntaxError ) , true ,
27
27
'Syntax error object correctly classed by napi_is_error' ) ;
28
-
28
+
29
29
// Test that native range error object is correctly classed
30
30
assert . strictEqual ( test_error . checkError ( theRangeError ) , true ,
31
31
'Range error object correctly classed by napi_is_error' ) ;
32
-
32
+
33
+ // Test that native reference error object is correctly classed
34
+ assert . strictEqual ( test_error . checkError ( theReferenceError ) , true ,
35
+ 'Reference error object correctly classed by' +
36
+ ' napi_is_error' ) ;
37
+
33
38
// Test that native URI error object is correctly classed
34
39
assert . strictEqual ( test_error . checkError ( theURIError ) , true ,
35
40
'URI error object correctly classed by napi_is_error' ) ;
36
-
41
+
37
42
// Test that native eval error object is correctly classed
38
43
assert . strictEqual ( test_error . checkError ( theEvalError ) , true ,
39
44
'Eval error object correctly classed by napi_is_error' ) ;
40
-
45
+
41
46
// Test that class derived from native error is correctly classed
42
47
assert . strictEqual ( test_error . checkError ( myError ) , true ,
43
- 'Class derived from native error correctly classed by napi_is_error' ) ;
48
+ 'Class derived from native error correctly classed by' +
49
+ ' napi_is_error' ) ;
44
50
45
51
// Test that non-error object is correctly classed
46
52
assert . strictEqual ( test_error . checkError ( { } ) , false ,
0 commit comments