![pnpm 9.5 Introduces Catalogs: Shareable Dependency Version Specifiers](https://cdn.sanity.io/images/cgdhsj6q/production/c06a5b74512bcc6da29d38cef96a454fa947810d-1024x1024.webp?w=400&fit=max&auto=format)
Security News
pnpm 9.5 Introduces Catalogs: Shareable Dependency Version Specifiers
pnpm 9.5 introduces a Catalogs feature, enabling shareable dependency version specifiers, reducing merge conflicts and improving support for monorepos.
eslint-plugin-jasmine
Advanced tools
Package description
eslint-plugin-jasmine is an ESLint plugin that provides linting rules specific to Jasmine, a popular testing framework for JavaScript. This plugin helps ensure that Jasmine tests follow best practices and maintain consistency.
no-focused-tests
This rule disallows the use of focused tests (e.g., `fit` and `fdescribe`) to prevent accidentally committing them.
module.exports = {
"rules": {
"jasmine/no-focused-tests": "error"
}
};
no-disabled-tests
This rule warns against the use of disabled tests (e.g., `xdescribe` and `xit`) to ensure that all tests are active.
module.exports = {
"rules": {
"jasmine/no-disabled-tests": "warn"
}
};
no-suite-dupes
This rule prevents the creation of duplicate test suite names, which can cause confusion and errors in test reporting.
module.exports = {
"rules": {
"jasmine/no-suite-dupes": "error"
}
};
no-spec-dupes
This rule prevents the creation of duplicate test spec names within a suite, ensuring each test is unique and easily identifiable.
module.exports = {
"rules": {
"jasmine/no-spec-dupes": ["error", "branch"]
}
};
prefer-toHaveBeenCalledWith
This rule encourages the use of `toHaveBeenCalledWith` over `toHaveBeenCalled` to make assertions more specific and meaningful.
module.exports = {
"rules": {
"jasmine/prefer-toHaveBeenCalledWith": "warn"
}
};
eslint-plugin-jest is an ESLint plugin for Jest, another popular testing framework. It provides similar linting rules to ensure best practices and consistency in Jest tests. While eslint-plugin-jasmine is tailored for Jasmine, eslint-plugin-jest is specifically designed for Jest.
eslint-plugin-mocha is an ESLint plugin for Mocha, a feature-rich JavaScript test framework. It offers linting rules to enforce best practices and consistency in Mocha tests. Like eslint-plugin-jasmine, it focuses on a specific testing framework, but for Mocha instead of Jasmine.
eslint-plugin-qunit is an ESLint plugin for QUnit, a powerful, easy-to-use JavaScript unit testing framework. It provides linting rules to ensure best practices and consistency in QUnit tests. This plugin is similar to eslint-plugin-jasmine but is designed for QUnit.
Readme
ESLint rules for Jasmine
Install eslint-plugin-jasmine
as a dev-dependency:
npm install --save-dev eslint-plugin-jasmine
Enable the plugin by adding it to your .eslintrc
:
plugins:
- jasmine
This plugin ships with a default configuration for each rule:
Rule | Default |
---|---|
no-focused-tests | 2 |
no-disabled-tests | 1 |
For example, the no-focused-tests
rule is enabled by default and will cause
ESLint to throw an error (with an exit code of 1
) when triggered.
You may customise each rule by adding a value in your .eslintrc
rules
property:
plugins:
- jasmine
rules:
jasmine/no-focused-tests: 0
See configuring rules for more information.
© 2015 Tom Vincent git@tlvince.com
Licensed under the MIT license.
FAQs
Unknown package
We found that eslint-plugin-jasmine 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
pnpm 9.5 introduces a Catalogs feature, enabling shareable dependency version specifiers, reducing merge conflicts and improving support for monorepos.
Security News
A threat actor on BreachForums is selling an unverified npm vulnerability for account takeover, but npm has not officially confirmed the existence of this security concern.
Security News
Cyber insurance rates are dropping as the market matures, according to a new report projecting global premiums to reach $43 billion by 2030, driven by international market uptake and growth in the SME sector.