
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@rnx-kit/jest-preset
Advanced tools
A Jest preset with support for React Native platform-specific extensions and TypeScript.
Add preset: "@rnx-kit/jest-preset"
to your Jest config:
module.exports = {
+ preset: "@rnx-kit/jest-preset",
...
};
@rnx-kit/jest-preset
will detect that you're not targeting React Native and
exclude any React Native specific configurations.
There are three ways to use this preset when targeting React Native, depending on your personal preference.
jest.config.js
If you prefer to use a single Jest config, you can provide the target platform
via an environment variable. First, add preset: "@rnx-kit/jest-preset"
to your
Jest config:
module.exports = {
+ preset: "@rnx-kit/jest-preset",
...
};
Then specify the target platform when running Jest:
RN_TARGET_PLATFORM=ios npm run jest
jest.config.js
Alternatively, you can have a Jest config file for each platform, e.g.:
// jest.config.ios.js
module.exports = require("@rnx-kit/jest-preset")("ios", {
...
});
Then specify the config file to use when running Jest:
npm run jest --config jest.config.ios.js
@rnx-kit/cli
You can specify the target platform using the rnx-test
command provided by
@rnx-kit/cli
. First, add preset: "@rnx-kit/jest-preset"
to your Jest config:
module.exports = {
+ preset: "@rnx-kit/jest-preset",
...
};
Then specify the target platform when running rnx-test
:
npm run react-native rnx-test --platform ios
Add preset: "@rnx-kit/jest-preset"
to your Jest config:
module.exports = {
+ preset: "@rnx-kit/jest-preset",
...
};
The target platform will be deduced by reading react-native.config.js
at the
package root.
FAQs
Jest preset for React Native code bases
The npm package @rnx-kit/jest-preset receives a total of 2,856 weekly downloads. As such, @rnx-kit/jest-preset popularity was classified as popular.
We found that @rnx-kit/jest-preset demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.