Skip to content
This repository was archived by the owner on Feb 4, 2018. It is now read-only.

Commit 0cb0cc0

Browse files
author
blond
committed
test(error): error message more handy
1 parent a9c5de6 commit 0cb0cc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/construct.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ test('should create object and normalize boolean modifier', t => {
2929
test('should throw error for if entity object is not valid', t => {
3030
t.throws(
3131
() => new BemEntityName({ elem: 'elem' }),
32-
/This is not valid BEM entity: the field `block` is undefined\./
32+
"The object `{ elem: 'elem' }` is not valid BEM entity: the field `block` is undefined"
3333
);
3434
});
3535

3636
test('should throw error for if mod object is empty', t => {
3737
t.throws(
3838
() => new BemEntityName({ block: 'block', mod: {} }),
39-
/This is not valid BEM entity: the field `mod.name` is undefined\./
39+
"The object `{ block: 'block', mod: {} }` is not valid BEM entity: the field `mod.name` is undefined"
4040
);
4141
});
4242

4343
test('should throw error for if mod name is undefined', t => {
4444
t.throws(
4545
() => new BemEntityName({ block: 'block', mod: { val: 'val' } }),
46-
/This is not valid BEM entity: the field `mod.name` is undefined\./
46+
"The object `{ block: 'block', mod: { val: 'val' } }` is not valid BEM entity: the field `mod.name` is undefined"
4747
);
4848
});

0 commit comments

Comments
 (0)