Current Size:
Chakra BreakPoints
base0px
sm480px
md768px
lg992px
xl1280px
2xl1536px
Current Height:Width
widthpx
heightpx

Subjects

JavaScript Testing

Date Created: 2024/01/24

Last Update: 2024/03/17

#js-test

Reference

Jest

Example Single Test

"foo.js"
export function foo(a,b){
return a + b
}
"foo.test.js"
import foo from "./foo.js"
test('test foo', async () => {
expect(foo(3, 6)).toBe(9);
});

Test Specific Path

jest path/to/my-test.js

or

npm test -- path/to/my-test.js

More Notes

All Notes
HomeProjects

Links

Home Articles Notes Projects About Style Guide Site Credits

Contact

 [email protected]

Location

🌎 Earth