
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
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.
4.0.2
FAQs
Additional Jest matchers
The npm package jest-extended receives a total of 1,397,856 weekly downloads. As such, jest-extended popularity was classified as popular.
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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.