Installations
npm install jest-serializer-react-helmet-async
Score
72.3
Supply Chain
91.1
Quality
75.6
Maintenance
100
Vulnerability
100
License
Developer
keplersj
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
12.22.4
NPM Version
7.11.1
Statistics
955 Commits
3 Watching
14 Branches
1 Contributors
Updated on 03 Aug 2021
Bundle Size
1.50 kB
Minified
631.00 B
Minified + Gzipped
Languages
TypeScript (66.52%)
JavaScript (33.48%)
Total Downloads
Cumulative downloads
Total Downloads
337,845
Last day
-25.5%
202
Compared to previous day
Last week
-11.3%
1,766
Compared to previous week
Last month
-10.3%
7,787
Compared to previous month
Last year
-2.8%
75,954
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
2
Dev Dependencies
23
jest-serializer-react-helmet-async
Jest Snapshot serializer to visualize react-helmet-async data alongside component snapshots.
Installation
Install preset using npm:
1npm install --save-dev jest-serializer-react-helmet-async
or yarn:
1yarn add --dev jest-serializer-react-helmet-async
Usage
Configure Jest to use the serializer in jest.config.js
:
1module.exports = { 2 snapshotSerializers: ["jest-serializer-react-helmet-async"], 3};
or package.json
:
1{ 2 "jest": { 3 "snapshotSerializers": ["jest-serializer-react-helmet-async"] 4 } 5}
In your tests
Unlike jest-serializer-react-helmet
, this serializer does not automatically prepend the serialized data to the snapshots of your React components. You must add an assert for react-helmet-async
to be serialized.
Your test should like similar to the following:
1import * as React from "react"; 2import renderer from "react-test-renderer"; 3import { HelmetProvider } from "react-helmet-async"; 4 5describe("App", () => { 6 it("renders as expected", () => { 7 const context = {}; 8 const tree = renderer 9 .create( 10 <HelmetProvider context={context}> 11 <App /> 12 </HelmetProvider> 13 ) 14 .toJSON(); 15 16 expect(tree).toMatchSnapshot(); 17 expect(context.helmet).toMatchSnapshot(); 18 }); 19});
Related Packages
jest-runner-prettier
- Use Jest to check your codebase againstprettier
jest-preset-gatsby
- Jest preset to ease unit testing a Gatsby projectjest-serializer-json-ld-script
- Jest snapshot serializer to better visualize React<script>
elements containing LD+JSON datajest-raw-loader
- Load the raw content of files in Jest, replicating the behavior ofwebpack
'sraw-loader
License
Copyright 2019 Kepler Sticka-Jones. Licensed ISC
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: ISC License: LICENSE:0
Reason
Found 0/15 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/nodejs.yml:1
- Warn: no topLevel permission defined: .github/workflows/semantic-release.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/nodejs.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/keplersj/jest-serializer-react-helmet-async/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/keplersj/jest-serializer-react-helmet-async/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/keplersj/jest-serializer-react-helmet-async/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/semantic-release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/keplersj/jest-serializer-react-helmet-async/semantic-release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/semantic-release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/keplersj/jest-serializer-react-helmet-async/semantic-release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/semantic-release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/keplersj/jest-serializer-react-helmet-async/semantic-release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/semantic-release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/keplersj/jest-serializer-react-helmet-async/semantic-release.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:20
- Warn: npmCommand not pinned by hash: .github/workflows/semantic-release.yml:17
- Warn: npmCommand not pinned by hash: .github/workflows/semantic-release.yml:29
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 0 out of 3 npmCommand 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 30 are checked with a SAST tool
Reason
42 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-2h3h-q99f-3fhc
- Warn: Project is vulnerable to: GHSA-gmw6-94gg-2rc2
- 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-7wwv-vh3v-89cq
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-82v2-mx6x-wq7q
- Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj
- Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf
- 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-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-hj9c-8jmm-8c52
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-x2pg-mjhr-2m5x
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-29xr-v42j-r956
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7
- Warn: Project is vulnerable to: GHSA-558p-m34m-vpmq
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
- 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 2024-11-18
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