
Jest · Delightful JavaScript Testing
Jest is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase. It allows you to write tests with an approachable, familiar and feature-rich API that …
Getting Started - Jest
You can run Jest directly from the CLI (if it's globally available in your PATH, e.g. by yarn global add jest or npm install jest --global) with a variety of useful options.
Testing React Apps · Jest
See React: Function and Class Components. Reminders that with Class components, we expect Jest to be used to test props and not methods directly. Now let's use React's test renderer and …
Mock Functions - Jest
Now, in order to test this method without actually hitting the API (and thus creating slow and fragile tests), we can use the jest.mock(...) function to automatically mock the axios module.
Configuring Jest · Jest
Jest runs the code of your project as JavaScript, hence a transformer is needed if you use some syntax not supported by Node out of the box (such as JSX, TypeScript, Vue templates).
Expect - Jest
Jest adds the inlineSnapshot string argument to the matcher in the test file (instead of an external .snap file) the first time that the test runs. Check out the section on Inline Snapshots for more …
Jest CLI Options
The jest command line runner has a number of useful options. You can run jest --help to view all available options. Many of the options shown below can also be used together to run tests …
The Jest Object · Jest - jestjs.io
The jest object is automatically in scope within every test file. The methods in the jest object help create mocks and let you control Jest's overall behavior. It can also be imported explicitly by …
Code Transformation - Jest
Jest runs the code in your project as JavaScript, but if you use some syntax not supported by Node out of the box (such as JSX, TypeScript, Vue templates) then you'll need to transform …
Jest Versions - jestjs.io
Archived Versions Here you can find archived documentation for older versions of Jest.