
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
assert-jsnext
Advanced tools
This is a fork of the original assert package built to support
projects built using dependencies with the jsnext:main
field.
This module is used for writing unit tests for your applications, you can access it with require('assert-jsnext').
The API is derived from the commonjs 1.0 unit testing spec and the node.js assert module
Throws an exception that displays the values for actual and expected separated by the provided operator.
Tests if value is truthy, it is equivalent to equal(true, !!value, message);
Tests shallow, coercive equality with the equal comparison operator ( == ).
Tests shallow, coercive non-equality with the not equal comparison operator ( != ).
Tests for deep equality.
Tests for any deep inequality.
Tests strict equality, as determined by the strict equality operator ( === )
Tests strict non-equality, as determined by the strict not equal operator ( !== )
Expects block to throw an error. error can be constructor, regexp or validation function.
Validate instanceof using constructor:
throws(function() { throw new Error("Wrong value"); }, Error);
Validate error message using RegExp:
throws(function() { throw new Error("Wrong value"); }, /value/);
Custom error validation:
throws(function() {
throw new Error("Wrong value");
}, function(err) {
if ( (err instanceof Error) && /value/.test(err) ) {
return true;
}
}, "unexpected error");
Expects block not to throw an error, see throws
for details.
Tests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks.
FAQs
commonjs assert - node.js api compatible
The npm package assert-jsnext receives a total of 7 weekly downloads. As such, assert-jsnext popularity was classified as not popular.
We found that assert-jsnext 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.