
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.
parameterize your javascript tests
what if you never had to write a describe block again? what would you do with all the extra time saved?
require paratest
in your spec file and give it an array of tests to run
const paratest = require('paratest');
const compute = require('../src/compute');
const tests = [
{
subject: compute.sum,
cases: [
{
name: "works",
args: [1, 2],
result: 3
}, {
name: "works with floats",
args: [1.0, 2],
result: 3.0
}
]
}, {
subject: compute.mult,
cases: [
{
name: "works",
args: [1, 2],
result: 2
}, {
name: "works with floats",
args: [1.0, 2],
result: 2.0
}
]
}
];
paratest("compute", tests);
jasmine and jest work out of the box. to use mocha w/ chai, simply pass in a function as the third argument to paratest that does the assertion of your choice.
const expect = require('chai').expect;
...
paratest(
"compute",
tests,
(expected, actual) => expect(actual).to.deep.equal(expected)
);
FAQs
parameterize your js tests
We found that paratest 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.