About 400 results
Open links in new tab
  1. 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 …

  2. Getting Started - Jest

    Jest can be used in projects that use webpack to manage assets, styles, and compilation. webpack does offer some unique challenges over other tools. Refer to the webpack guide to …

  3. 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).

  4. 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.

  5. 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 …

  6. 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 …

  7. 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 …

  8. Globals - Jest

    In your test files, Jest puts each of these methods and objects into the global environment. You don't have to require or import anything to use them. However, if you prefer explicit imports, …

  9. Mock Functions - Jest

    The mocked() helper method wraps types of the source object and its deep nested members with type definitions of Jest mock function. You can pass {shallow: true} as the options argument to …

  10. Snapshot Testing · Jest

    The Jest repository contains many examples of testing the output of Jest itself, the output of Jest's assertion library as well as log messages from various parts of the Jest codebase.