Installations
npm install jest-matcher-specific-error
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
12.18.4
NPM Version
6.14.6
Score
82.5
Supply Chain
72.1
Quality
77.9
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (100%)
Developer
DanielHreben
Download Statistics
Total Downloads
1,237,924
Last Day
1,542
Last Week
6,606
Last Month
31,167
Last Year
452,638
GitHub Statistics
25 Stars
34 Commits
5 Forks
3 Watching
6 Branches
3 Contributors
Bundle Size
1.46 kB
Minified
723.00 B
Minified + Gzipped
Package Meta Information
Latest Version
1.0.0
Package Id
jest-matcher-specific-error@1.0.0
Unpacked Size
5.33 kB
Size
2.46 kB
File Count
6
NPM Version
6.14.6
Node Version
12.18.4
Total Downloads
Cumulative downloads
Total Downloads
1,237,924
Last day
24.8%
1,542
Compared to previous day
Last week
-3.3%
6,606
Compared to previous week
Last month
-2%
31,167
Compared to previous month
Last year
7.5%
452,638
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
jest-matcher-specific-error
Make sure your function really throws what you expect
Workaround for https://github.com/facebook/jest/issues/8140
Installation
With npm:
npm install --save-dev jest-matcher-specific-error
With yarn:
yarn add -D jest-matcher-specific-error
Setup
Same as Other jest matchers
Usage
1await expect(yourPromise).rejects.toMatchError(expectedError); 2await expect(yourFunction).rejects.toMatchError(expectedError); 3expect(yourError).toMatchError(expectedError);
Match logic
Errors threated as equal if ALL conditions satisfied:
- Errors are instances of same class (strict
===
comparison by reference) - Error messages are equal
- All error public fields are deeply equal (default
jest
helper comparison)
Error stack traces are ignored.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 1/16 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/branch-build.yml:1
- Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branch-build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/DanielHreben/jest-matcher-specific-error/branch-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branch-build.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/DanielHreben/jest-matcher-specific-error/branch-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/DanielHreben/jest-matcher-specific-error/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/DanielHreben/jest-matcher-specific-error/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/DanielHreben/jest-matcher-specific-error/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/DanielHreben/jest-matcher-specific-error/npm-publish.yml/master?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 17 are checked with a SAST tool
Reason
18 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
2.5
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More