Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 1, 2024 via pnpm

@types/jest 29.5.12

TypeScript definitions for jest
Package summary
Share
0
issues
2
licenses
50
MIT
2
ISC
Package created
17 May 2016
Version published
1 Feb 2024
Maintainers
1
Total deps
52
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
50 Packages, Including:
@babel/code-frame@7.24.2
@babel/helper-validator-identifier@7.24.5
@babel/highlight@7.24.5
@jest/expect-utils@29.7.0
@jest/schemas@29.6.3
@jest/types@29.6.3
@sinclair/typebox@0.27.8
@types/istanbul-lib-coverage@2.0.6
@types/istanbul-lib-report@3.0.3
@types/istanbul-reports@3.0.4
@types/jest@29.5.12
@types/node@20.12.7
@types/stack-utils@2.0.3
@types/yargs-parser@21.0.3
@types/yargs@17.0.32
ansi-styles@3.2.1
ansi-styles@4.3.0
ansi-styles@5.2.0
braces@3.0.2
chalk@2.4.2
chalk@4.1.2
ci-info@3.9.0
color-convert@1.9.3
color-convert@2.0.1
color-name@1.1.3
color-name@1.1.4
diff-sequences@29.6.3
escape-string-regexp@1.0.5
escape-string-regexp@2.0.0
expect@29.7.0
fill-range@7.0.1
has-flag@3.0.0
has-flag@4.0.0
is-number@7.0.0
jest-diff@29.7.0
jest-get-type@29.6.3
jest-matcher-utils@29.7.0
jest-message-util@29.7.0
jest-util@29.7.0
js-tokens@4.0.0
micromatch@4.0.5
picomatch@2.3.1
pretty-format@29.7.0
react-is@18.3.1
slash@3.0.0
stack-utils@2.0.6
supports-color@5.5.0
supports-color@7.2.0
to-regex-range@5.0.1
undici-types@5.26.5

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
graceful-fs@4.2.11
picocolors@1.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of @types/jest 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
expect29.7.022.38 kBMIT
prod
pretty-format29.7.014.34 kBMIT
prod

Visualizations

Frequently Asked Questions

What does @types/jest do?

The @types/jest is a valuable npm package that provides TypeScript definition for Jest. Jest is a popular JavaScript testing framework, and this package enables it to work seamlessly with TypeScript. It includes well-defined type definitions which ensure type safety when writing tests in TypeScript while leveraging Jest's robust testing capabilities. The TypeScript definition allows your IDE to provide intellisense and easier code navigation, which ultimately improve your coding experience.

How do you use @types/jest?

Using @types/jest is straightforward, first ensure you have already installed Jest and TypeScript in your project setup. Then, you run the following command in your terminal:

npm install --save-dev @types/jest

or

yarn add --dev @types/jest

After installation, you can create your tests as you would while writing them in TypeScript. As an example, here is how a test using Jest and TypeScript might look:

import { sum } from './sum';

test('adds 1 + 2 to equal 3', () => {
    expect(sum(1, 2)).toBe(3);
});

In the code snippet above, the function sum can enjoy TypeScript intellisense and won't throw TypeScript errors if properly used, thanks to @types/jest.

Where are the @types/jest docs?

The documentation for @types/jest can primarily be found on DefinitelyTyped's GitHub repository at https://github.com/DefinitelyTyped/DefinitelyTyped. However, being a type definition, most of the usage revolves around the usage of Jest itself, so Jest's official documentation at https://jestjs.io/docs/en/getting-started is also an indispensable resource.