
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
jasmine-parameterized
Advanced tools
Parameterized unit tests for Jasmine.
npm install jasmine-parameterized
This library provides a convenient cases function to easily parameterized the execution of it spec functions.
import { cases } from 'jasmine-parameterized';
describe('Customer', () => {
cases([
4,
14
])
.it('should be a child when aged 4 to 14 years', (age) => {
const customer = new Customer(age);
expect(customer.isChild()).toBe(true);
});
...

describe('Roman Numeral Converter', () => {
cases([
[1, 'I'],
[2, 'II'],
[3, 'III'],
[4, 'IV'],
[5, 'V'],
[6, 'VI']
])
.it('converts Arabic number to its equivalent Roman numeral', ([arabic, roman]) => {
expect(romanFor(arabic)).toBe(roman);
});
});

For complex cases or when we want to be more explicit.
describe('Fibonacci Sequence', () => {
describe('First two numbers', () => {
cases([
{index: 0, expected: 0},
{index: 1, expected: 1}
])
.it('should be same as index', ({index, expected}) => {
expect(fibonacciNumber(index)).toEqual(expected);
});
});
describe('Third number on', () => {
cases([
{index: 2, expected: 1},
{index: 3, expected: 2},
{index: 5, expected: 5}
])
.it('should be the sum of previous two', ({index, expected}) => {
expect(fibonacciNumber(index)).toEqual(expected);
});
});
});

FAQs
Parameterized unit tests for Jasmine
The npm package jasmine-parameterized receives a total of 2,277 weekly downloads. As such, jasmine-parameterized popularity was classified as popular.
We found that jasmine-parameterized 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
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.