19
Total Commands
100%
Free Access
⚡
Lightning Fast
Available Commands
Click on any command to copy it instantly
19 commands available
19 of 19
npm install --save-dev jestjest
install
testing
npx jest --initjest
init
config
npm testjest
run
test
npm test -- --watchjest
watch
development
npm test -- --coveragejest
coverage
report
const mockFn = jest.fn()jest
mock
functions
describe("Component", () => { ... })jest
describe
suites
it("should do something", () => { ... })jest
it
test
expect(value).toBe(expected)jest
expect
assertions
beforeEach(() => { ... })jest
before
setup
it("should resolve", async () => { ... })jest
async
promises
expect(component).toMatchSnapshot()jest
snapshot
components
jest.useFakeTimers()jest
timer
mock
jest.mock("./module")jest
module
mock
module.exports = { testEnvironment: "node" }jest
config
settings
npm install --save-dev @testing-library/reactjest
react
components
expect(element).toBeInTheDocument()jest
dom
elements
expect.extend({ toBeWithinRange })jest
custom
matchers
npm test -- --verbosejest
debug
troubleshoot
Missing a command?
Help us improve this collection by suggesting commands that should be added. Your contributions help the entire developer community!