
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
chai-nodules-helpers
Advanced tools
$ npm install chai-nodules-helpers
var assert = require('chai').use(require('chai-nodules-helpers')).assert;
assert.throwTerror(...);
assert.mixedProperly(...);
All assertions available for assert style only.
assert.isMixed(Target, Mixin, mixinName, staticExceptions, prototypeExceptions, mixingArgs)
{Objex} Target
– constructor;{Function|Object} Mixin
– mixin;{String} mixinName
– used in assertions messages;{String[]} staticExceptions
– array of statics propertyies names excluded from assertions;{String[]} prototypeExceptions
– array of prototypes propertyies names excluded from assertions;{Array} [mixingArgs]
– additional arguments to pass to mixin()
after Mixin
itself.assert.canBeMixed(Target, Mixin, mixinName, staticExceptions, prototypeExceptions, mixingArgs)
{Objex} Target
– constructor, inheritor of the Objex, mixin
method applies to;{Function|Object} Mixin
– mixin;{String} mixinName
– used in assertions messages;{String[]} staticExceptions
– array of statics propertyies names excluded from assertions;{String[]} prototypeExceptions
– array of prototypes propertyies names excluded from assertions;{Array} [mixingArgs]
– additional arguments to pass to mixin()
after Mixin
itself.assert.throwTerror(fn, ErrorClass, spec)
{Function} fn
– a function which expected to throw;{Fucntion|Error|Terror} [ErrorClass]
– must be a Terror inheritor, if spec
is specified, or any Error inheritor in other case;{RegExp|String|Number} [spec]
– error specifier; can be a string (Terror code name), number (Terror code) or RegExp (used for message test).If second argument is not a constructor (function), then helper recognize it as an specifier arg spec
.
FAQs
nodules-specific assertion helpers for chai
The npm package chai-nodules-helpers receives a total of 2 weekly downloads. As such, chai-nodules-helpers popularity was classified as not popular.
We found that chai-nodules-helpers 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.