Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit d3603f5

Browse files
chore: provides assertion error messages for "kind" in Chai
1 parent 7ff8e79 commit d3603f5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

test/chai.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ ${JSON.stringify(target)}
5555
createErrorPropertyAssertion('location', 'withLocation');
5656
createErrorPropertyAssertion('values', 'withValues');
5757

58-
//
59-
// TODO
60-
// Finish the error messages
6158
Assertion.addMethod('kind', function(expectedValue) {
6259
const { kind } = this._obj;
6360
const stringifiedObj = stringify(this._obj);
@@ -69,11 +66,17 @@ Expected the following HTTP message field:
6966
7067
${stringifiedObj}
7168
72-
to have "kind" property equal to "${expectedValue}".
69+
to have "kind" property equal "${expectedValue}", but got ${kind}.
70+
`,
71+
`
72+
Expected the following HTTP message field:
73+
74+
${stringifiedObj}
75+
76+
to not have "kind" property equal "${expectedValue}".
7377
`,
74-
'asdas',
75-
expectedValue,
7678
kind,
79+
expectedValue,
7780
true
7881
);
7982
});

0 commit comments

Comments
 (0)