We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helloWorld.js file:
const helloWorld = function() { return 'Hello, World!' }; module.exports = helloWorld;
helloWorld.spec.js file:
const helloWorld = require('./helloWorld').default; describe('Hello World', function() { test('says "Hello, World!"', function() { expect(helloWorld()).toEqual('Hello, World!'); }); });
when i run the test it tells me it fails anyways:
> javascript-exercises@1.0.0 test > jest "helloWorld.spec.js" FAIL helloWorld/helloWorld.spec.js Hello World ✕ says "Hello, World!" (2 ms) ● Hello World › says "Hello, World!" TypeError: helloWorld is not a function 3 | describe('Hello World', function() { 4 | test('says "Hello, World!"', function() { > 5 | expect(helloWorld()).toEqual('Hello, World!'); | ^ 6 | }); 7 | }); 8 | at Object.<anonymous> (helloWorld/helloWorld.spec.js:5:12)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
helloWorld.js file:
helloWorld.spec.js file:
when i run the test it tells me it fails anyways:
The text was updated successfully, but these errors were encountered: