-
-
Notifications
You must be signed in to change notification settings - Fork 320
'it' is not defined
#2236
-
Greetings all,
I am trying to run a test using web-test-runner. I am following the steps from this documentation: https://modern-web.dev/guides/test-runner/getting-started/
The documentation instructs to install the necessary packages:
npm i --save-dev @web/test-runner @esm-bundle/chai
Then writting the test with the required imports:
import { expect } from '@esm-bundle/chai';
import { sum } from '../src/sum.js';
it('sums up 2 numbers', () => {
expect(sum(1, 1)).to.equal(2);
expect(sum(3, 12)).to.equal(15);
});
Now, I am getting a warning, that 'it' is not defined:
'it' is not defined.
Of course is not, since I didn't import it.
- Where should I import this function from?
- Why does the documentation gives a code example that uses a function that is not installed/included? This causes confusion.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment