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.
jest-extended
Advanced tools
jest-extended is a set of additional matchers for Jest, a popular JavaScript testing framework. It extends Jest's built-in matchers with a variety of new ones, making it easier to write more expressive and comprehensive tests.
Array Matchers
Checks if the value is an array.
expect([1, 2, 3]).toBeArray();
Object Matchers
Checks if the object contains the specified key.
expect({ a: 1 }).toContainKey('a');
String Matchers
Checks if the string starts with the given substring.
expect('hello world').toStartWith('hello');
Number Matchers
Checks if the number is within the specified range.
expect(10).toBeWithin(5, 15);
Date Matchers
Checks if the date is after the specified date.
expect(new Date('2023-01-01')).toBeAfter(new Date('2022-12-31'));
Chai is an assertion library for Node.js and the browser that can be delightfully paired with any JavaScript testing framework. It provides a variety of assertion styles (should, expect, assert) and is highly extensible.
Should.js is an expressive, readable, and powerful assertion library for Node.js and the browser. It extends Object.prototype to provide a more natural way to write assertions.
Expect is a minimalistic assertion library for JavaScript. It is often used with Jest but can be used standalone. It provides a set of simple and intuitive matchers.
🃏💪
Additional Jest matchers
Jest is an amazing test runner and has some awesome assertion APIs built in by default. However, there are times when having more specific matchers (assertions) would be far more convenient.
jest-extended aims to add additional matchers to Jest's default ones making it easy to test everything 🙌
If you've come here to help contribute - Thanks! Take a look at the contributing docs as a way of getting started.
See the Installation Guide on Jest Extended documentation site.
See the Setup instructions on Jest Extended documentation site.
See all available matchers and interactive repl on Jest Extended documentation site.
FAQs
Additional Jest matchers
We found that jest-extended demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.