@@ -21,9 +21,7 @@ import { fail, hardAssert } from '../../../src/util/assert';
21
21
22
22
describe ( 'hardAssert' , ( ) => {
23
23
it ( 'includes the error code as hex' , ( ) => {
24
- expect ( ( ) => hardAssert ( false , 0x1234 , 'a message here' ) ) . to . throw (
25
- '12345678'
26
- ) ;
24
+ expect ( ( ) => hardAssert ( false , 0x1234 , 'a message here' ) ) . to . throw ( '1234' ) ;
27
25
} ) ;
28
26
29
27
it ( 'includes the context' , ( ) => {
@@ -40,7 +38,7 @@ describe('hardAssert', () => {
40
38
41
39
describe ( 'without message' , ( ) => {
42
40
it ( 'includes the error code as hex' , ( ) => {
43
- expect ( ( ) => hardAssert ( false , 0x1234 ) ) . to . throw ( '12345678 ' ) ;
41
+ expect ( ( ) => hardAssert ( false , 0x1234 ) ) . to . throw ( '1234 ' ) ;
44
42
} ) ;
45
43
46
44
it ( 'includes the context' , ( ) => {
@@ -58,7 +56,7 @@ describe('hardAssert', () => {
58
56
59
57
describe ( 'fail' , ( ) => {
60
58
it ( 'includes the error code as hex' , ( ) => {
61
- expect ( ( ) => fail ( 0x1234 , 'a message here' ) ) . to . throw ( '12345678 ' ) ;
59
+ expect ( ( ) => fail ( 0x1234 , 'a message here' ) ) . to . throw ( '1234 ' ) ;
62
60
} ) ;
63
61
64
62
it ( 'includes the context' , ( ) => {
@@ -75,7 +73,7 @@ describe('fail', () => {
75
73
76
74
describe ( 'without message' , ( ) => {
77
75
it ( 'includes the error code as hex' , ( ) => {
78
- expect ( ( ) => fail ( 0x1234 ) ) . to . throw ( '12345678 ' ) ;
76
+ expect ( ( ) => fail ( 0x1234 ) ) . to . throw ( '1234 ' ) ;
79
77
} ) ;
80
78
81
79
it ( 'includes the context' , ( ) => {
0 commit comments