
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
@anansi/jest-preset
Advanced tools
Testing should just work
module.exports = {
preset: "@anansi/jest-preset"
}
See @anansi/webpack-config for full list of module formats supported.
Anansi's webpack automatically makes media files, svgs, scss/css modules, webworkers and TypeScript or babel work automatically. Using this preset enables all those module types to be handled in exactly as you'd expect with the webpack config.
Jest doesn't give much flexibility with regard to presets, so we provide some environmental variables to do customizations that impact multiple aspects of the configuration. However, this can also be done in a javascript jest config like so:
process.env.ANANSI_JEST_BABELCONFIG = 'babel.config.js';
process.env.ANANSI_JEST_TSCONFIG = 'tsconfig.test.json';
module.exports = {
preset: '@anansi/jest-preset',
};
It might be useful to have a specific tsconfig for tests that inherits from the base config. Use this variable to have jest pickup that file instead.
By default jest will automatically search for the appropriate babel configuration (with the value of true
).
In case this doesn't work you can specify a string for the babel configuration.
Using 'babel.config.js' will automatically invoke the rootMode: 'upward'
algorithm.
If set to 'false', this disables type checking which can reduce memory usage quite a bit.
This can be useful when running tests in multiple environments as the environment often doesn't impact typing, making re-checking types a waste of resources.
FAQs
Jest Preset for Anansi
The npm package @anansi/jest-preset receives a total of 26 weekly downloads. As such, @anansi/jest-preset popularity was classified as not popular.
We found that @anansi/jest-preset demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.