Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Test grouping and formatting to make working with vanilla node assert marginally easier
Test grouping and formatting to make working with vanilla node assert marginally easier
4.0.2
npm install asserts --save
or in package.json
{
...
"dependencies": {
"asserts": "4.0.2"
}
}
NOTE: Examples below work but are out of date in demonstrating current functionality (particularly async support, .dir, and .all.*) check test/test.js for better examples.
examples/happy.js looks like this:
var Assert = require('assert');
var Asserts = require('asserts');
Asserts({
foo : function() {
Assert.equal("something", "something", "optional message");
Assert.equal(2, 2);
},
barf : {
ing : function () {
Assert.equal(1, 1, "okay");
},
ed : function() {
Assert.equal(2, 2, "yep");
}
}
});
and when run looks like this:
examples/sad.js looks like this:
var Assert = require('assert');
var Asserts = require('asserts');
Asserts({
"foo": function() {
Assert.equal("something", "something", "optional message");
Assert.equal(2, 2);
},
"barf" : {
"ing": function () {
Assert.equal(1, 1, "okay");
},
"ed": function() {
Assert.equal(2, 3, "yep");
},
"o": {
"rama": function() {
Assert.equal(2, 10, "MATH");
},
"hnooooo": function() {
Assert.equal(1, 1);
}
}
},
"meh": function() {
Assert.equal(1, 2, "oh nooooo");
}
});
and when run looks like this:
Check test/test.js for example of Asserts.dir and Asserts.['equal', 'notEqual', 'deepEqual', 'notDeepEqual', 'strictEqual', 'notStrictEqual']
#TODO
add better documentation for 4.0.0 stuff - async support, .all., .dir
FAQs
Test grouping and formatting to make working with vanilla node assert marginally easier
The npm package asserts receives a total of 1,828 weekly downloads. As such, asserts popularity was classified as popular.
We found that asserts 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.