Last active
February 7, 2017 21:34
-
-
Save GarthDB/f46ef0dd6bc534f56d02f7a6aa4242a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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