
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
eslint-plugin-jest-runner-groups-validator
Advanced tools
Validates that Jest runner groups applied to test files are from a known set
Provides an ESLint plugin that validates Jest runner groups applied to tests. These groups are the ones are defined using jest-runner-groups.
This is useful when you would like to restrict groups to a particular subset:
Assuming you have ESLint installed already:
npm install --save-dev eslint-plugin-jest-runner-groups-validator
In your .eslintrc.json
(or similar):
{
"plugins": [
"jest-runner-groups-validator"
],
"rules": {
"jest-runner-groups-validator/must-match": "error",
"jest-runner-groups-validator/top-level": "error"
}
}
Then in your package.json
file, define a property:
{
squadTags: ["Fast", "Slow", "Smoke"]
name: ...,
dependencies: ...
etc...
}
The top-level
rule, when enabled, will require that a groups docblock is defined in every file that contains tests, as determined by .test.[ext]
files.
The must-match
rule will then validate that those groups are restricted to the set of known values in the package.json
file, as above. There is a single option in this rule, which allows you to specify the name of the property in the package:
// .eslintrc.json
{
"jest-runner-groups-validator/must-match": ["error", { "propertyName": "groupings" }]
}
which corresponds with:
// package.json
{
groupings: ["Fast", "Slow", "Smoke"]
name: ...,
dependencies: ...
etc...
}
The default property is squadTags
. You can define this property as either an array:
// package.json
{
squadTags: ["Fast", "Slow", "Smoke"]
name: ...,
dependencies: ...
etc...
}
// Code allows any of:
/**
* @group Fast
* @group Slow
* @group Smoke
*/
or an object of arrays:
// package.json
{
squadTags: {
"sanity": ["Fast", "Smoke", "Sanity"],
"full": ["Fast", "Slow", "Regression"]
},
name: ...,
dependencies: ...
etc...
}
// Code allows any of:
/**
* @group Fast
* @group Slow
* @group Smoke
* @group Sanity
* @group Regression
*/
top-level
, a new comment will be added, with a placeholder group, to the top of the file, if one does not already exist.
TODO
is not a valid group name and the top text (if it was empty) needs to be replaced.must-match
, there are no fixes. But there are "autocorrect" suggestions for possible group names. e.g.
/**
* @group Slo
^^^^^^^^^^ Invalid group name 'Slo'. Did you mean 'Slow'?
*/
FAQs
Validates that Jest runner groups applied to test files are from a known set
The npm package eslint-plugin-jest-runner-groups-validator receives a total of 745 weekly downloads. As such, eslint-plugin-jest-runner-groups-validator popularity was classified as not popular.
We found that eslint-plugin-jest-runner-groups-validator 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 Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.