Skip to content

Instantly share code, notes, and snippets.

@GarthDB
Last active February 7, 2017 21:34
Show Gist options
  • Save GarthDB/f46ef0dd6bc534f56d02f7a6aa4242a0 to your computer and use it in GitHub Desktop.
Save GarthDB/f46ef0dd6bc534f56d02f7a6aa4242a0 to your computer and use it in GitHub Desktop.
import test from 'ava';
class Basic {
constructor(str) {
this.str = str;
}
}
test('should match object and typed object', t => {
const basic = new Basic('tada');
const expected = JSON.parse('{ "str": "tada" }');
t.deepEqual(basic, expected);
});
$ npm test -- --match 'should match object and typed object'
> atomdoc-cli@1.0.6 test /Users/garthdb/Projects/atomdoc-cli
> ava "--match" "should match object and typed object"
1 failed
simple › should match object and typed object
test/simple.js:12
11: const expected = JSON.parse('{ "str": "tada" }');
12: t.deepEqual(basic, expected);
13: });
Difference:
- Basic {
+ Object {
str: "tada",
}
Test.fn (test/simple.js:12:5)
The .only() modifier is used in some tests. 28 tests were not run
npm ERR! Test failed. See above for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment