ESLint rules for Node.js assert module.
🔧 Automatically fixable by the --fix CLI option.
| Name | Description | 🔧 |
|---|---|---|
| consistent-import | Enforce a consistent Node.js assert import style | |
| no-async-function-in-sync-assertion | Disallow passing async functions to synchronous Node.js assert methods | |
| no-await-argument-in-rejects | Disallow awaiting the argument passed to assert.rejects() and assert.doesNotReject() | 🔧 |
| no-constant-actual | Disallow passing a constant value as the first argument to Node.js assert methods | 🔧 |
| no-expected-value-as-message | Disallow passing an expected value where a message or error matcher belongs in Node.js assert calls | |
| no-restricted-assertion | Disallow configured Node.js assert methods | |
| no-useless-assertion | Disallow Node.js assertions whose outcome is fully determined by constant inputs | |
| prefer-comparison-assertion | Prefer dedicated equality assertion methods over asserting comparison results | 🔧 |
| prefer-deep-equality | Prefer deep equality assertions when comparing object or array literals | 🔧 |
| prefer-match | Prefer assert.match() or assert.doesNotMatch() for regular expression assertions | 🔧 |
| prefer-partial-deep-strict-equal | Prefer a single partialDeepStrictEqual over multiple consecutive equality assertions on properties of the same object |
|
| require-custom-message | Require a custom failure message argument in Node.js assert calls | |
| require-error-matcher | Require assert.throws() and assert.rejects() to include an error matcher | |
| require-strict | Require strict assertion semantics for Node.js assert equality methods | 🔧 |
| require-valid-error-validator-return | Require custom Node.js assert error validators to return true when their checks pass |