
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
sweet-assertions
Advanced tools
Syntax for writing informative testing assertions.
This is a set of macros for Sweet.js which extends JavaScript grammar with
syntax for writing informative testing assertions. It tries to generate
assertion messages which contain useful information, like 1 should be == 2
would generate 1 should be equal to 2 error message and so on.
I suggest using it with sweet-bdd for better describe, it syntax:
% npm install --global sweet.js
% npm install sweet-bdd sweet-assertions
Use:
sjs -m sweet-bdd -m sweet-assertions tests.sjs
where tests.sjs looks like this:
var assert = require('assert');
describe "sweet-assertions" {
function no() { throw new Error('x'); }
function yes() { }
it "works" {
1 + 2 should == 2 + 1
2 should != 1
2 should > 1
2 should >= 1
1 should < 2
1 should <= 2
{x: 1} should have x
true should be true
false should be false
true should be truthy
null should be falsy
no() should throw
yes() should not throw
"aabbcc" should contain "bb"
}
}
FAQs
Syntax for writing informative testing assertions
The npm package sweet-assertions receives a total of 10 weekly downloads. As such, sweet-assertions popularity was classified as not popular.
We found that sweet-assertions 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.