Skip to content

Commit

Permalink
Update to jest 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fkling committed Mar 27, 2016
1 parent 9e5de46 commit 921cfa9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"devDependencies": {
"babel": "^5.6.14",
"babel-jest": "^5.3.0",
"jest-cli": "^0.8.0"
"jest-cli": "^0.9.0"
},
"jest": {
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
Expand Down
13 changes: 9 additions & 4 deletions src/__tests__/matchNode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/

/*global jest, describe, it, expect*/
/*global jest, describe, it, expect, beforeEach*/

jest.autoMockOff();
var matchNode = require('../matchNode');

describe('matchNode', function() {
beforeEach(function() {
jest.addMatchers({
toMatchNode: function(needle) {
var haystack = this.actual;
return matchNode(haystack, needle);
toMatchNode: function() {
return {
compare(haystack, needle) {
const result = {};
result.pass = matchNode(haystack, needle);
return result;
},
};
}
});
})
Expand Down

0 comments on commit 921cfa9

Please sign in to comment.