
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
jest-watch-toggle-config-2
Advanced tools
Jest watch plugin for toggling boolean settings (e.g. verbosity, test coverage)
This is a fork of jest-watch-toggle-config. It seems like the original plugin is no longer maintained.
Toggle your Jest boolean config settings at will
Install jest
(it needs Jest 23.4.1+) and jest-watch-toggle-config
yarn add --dev jest jest-watch-toggle-config-2
# or with NPM
npm install --save-dev jest jest-watch-toggle-config-2
This plugin is used in @repobuddy/jest watch config.
Since Jest 23.3, you can provide per-instance watch plugin configuration. Jest 23.4.1 opens up the list of global configuration settings that can be altered by watch plugins. Together, these evolutions let us use this same plugin in multiple ways, as along as the targeted configuration setting is boolean.
There are three mandatory configuration items you need to provide:
setting
is the boolean Jest configuration setting you want to toggle. Boolean settings available for configuration through watch plugins, as of Jest 23.4.1, include bail
, collectCoverage
, noSCM
, notify
, onlyFailures
, passWithNoTests
and verbose
.key
is the keyboard key that will be bound to this plugin instance, toggling the setting you’re interested in. We actually provide a default key for each option, trying our best not to step on Jest’s built-in keys, but they might conflict with another plugin's key. So you can tweak it.prompt
is the plugin prompt displayed in the watch menu. In this text, you can use the %ONOFF%
placeholder, that will be dynamically replaced by either on
or off
, depending on the resulting setting value. We also provide good defaults for the options listed above, but feel free to tweak them.Here’s an example for toggling both test verbosity (details of passed/failed tests) and code coverage collection with this plugin.
In your package.json
:
{
"jest": {
"watchPlugins": [
["jest-watch-toggle-config-2", { "setting": "verbose" }],
["jest-watch-toggle-config-2", { "setting": "collectCoverage" }]
]
}
}
Or in jest.config.js
module.exports = {
// …
watchPlugins: [
['jest-watch-toggle-config-2', { setting: 'verbose' }],
['jest-watch-toggle-config-2', { setting: 'collectCoverage' }],
],
}
yarn jest --watch
# or with NPM
npx jest --watch
As of Jest 23.4.1, the following boolean options have sane defaults you can leverage to lighten your configuration:
Option | Key | Prompt |
---|---|---|
bail | b | turn %ONOFF% bailing at first error |
collectCoverage | e * | turn %ONOFF% code coverage collection |
notify | n | turn %ONOFF% desktop notifications |
verbose | v | turn %ONOFF% test verbosity |
* Jest already reserves c
, o
and v
…
2.1.0
jest-validate
from peer dependency.FAQs
Jest watch plugin for toggling boolean settings (e.g. verbosity, test coverage)
The npm package jest-watch-toggle-config-2 receives a total of 166 weekly downloads. As such, jest-watch-toggle-config-2 popularity was classified as not popular.
We found that jest-watch-toggle-config-2 demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.