Jest: Difference between revisions
Jump to navigation
Jump to search
Created page with "=Naming Test= __tests__/*.js *.spec.js *.test.js" |
No edit summary |
||
Line 3: | Line 3: | ||
*.spec.js | *.spec.js | ||
*.test.js | *.test.js | ||
=Example Test= | |||
Describe is the suite, it is the test | |||
describe("The question list ", ()=> { | |||
it ("should display a list of items", ()=> { | |||
expect(2+2).toEqual(4); | |||
}) | |||
it ("should display a list of items", ()=> { | |||
expect(2+4).toEqual(6); | |||
}) | |||
}) |
Revision as of 00:39, 21 May 2020
Naming Test
__tests__/*.js *.spec.js *.test.js
Example Test
Describe is the suite, it is the test
describe("The question list ", ()=> { it ("should display a list of items", ()=> { expect(2+2).toEqual(4); })
it ("should display a list of items", ()=> { expect(2+4).toEqual(6); })
})