Skip to content

Instantly share code, notes, and snippets.

@avaly
Created February 7, 2017 11:32
Show Gist options
  • Save avaly/7c810953d6c12f63aa93097bc2a1cf7d to your computer and use it in GitHub Desktop.
Save avaly/7c810953d6c12f63aa93097bc2a1cf7d to your computer and use it in GitHub Desktop.
jest-getting-started-bug
{
"name": "jest-bug",
"version": "1.0.0",
"description": "",
"scripts": {
"test": "jest"
},
"license": "ISC",
"devDependencies": {
"jest": "^18.1.0"
}
}
function sum(a, b) {
return a + b;
}
module.exports = sum;
const sum = require('./sum');
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
});
@avaly
Copy link
Author

avaly commented Feb 7, 2017

Output:

$ npm test

> [email protected] test /foo/dev/tmp/jest-test
> jest

No tests found
No files found in /foo/dev/tmp/jest-test.
Make sure Jest's configuration does not exclude this directory.
To set up Jest, make sure a package.json file exists.
Jest Documentation: facebook.github.io/jest/docs/configuration.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment