Last active
August 29, 2015 14:01
-
-
Save jeffmo/e2a2528c3a91d6c85843 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
jest "/test.js" | |
Using Jest CLI v0.1.5 | |
Found 1 matching tests... | |
PASS __tests__/test.js (0.012s) | |
0/1 tests failed | |
Run time: 1.08s |
This file contains hidden or 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
describe('mockReturn test', function() { | |
it('mockReturnValue', function() { | |
var mock = jest.genMockFn(); | |
mock.mockReturnValue(42); | |
expect(mock()).toBe(42); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment