Created
June 26, 2015 04:06
-
-
Save why-jay/aefc5405f27e20b08ebc to your computer and use it in GitHub Desktop.
Revisions
-
YJ Yang created this gist
Jun 26, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ Using Jest CLI v0.4.13 FAIL __tests__/foo-test.js (0.896s) ● foo() › it should throw - Expected function to throw an exception. 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ node v0.12.2 npm v2.11.2 babel-jest v5.3.0 jest-cli v0.4.13 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ // __tests__/foo-test.js import foo from '../src/foo.js'; describe('foo()', () => { it('should throw', () => { expect(() => { foo(); }).toThrow(); }); }); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ // src/foo.js export default function foo() { throw new Error(); } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ { "devDependencies": { "babel-jest": "*", "jest-cli": "*" }, "scripts": { "test": "jest" }, "jest": { "scriptPreprocessor": "<rootDir>/node_modules/babel-jest", "testFileExtensions": ["es6", "js"], "moduleFileExtensions": ["js", "json", "es6"], "unmockedModulePathPatterns": ["lodash"] } }