
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
jest-serializer-react-helmet-async
Advanced tools
Serializer to display react-helmet-async data in Jest Snapshots
Jest Snapshot serializer to visualize react-helmet-async data alongside component snapshots.
Install preset using npm:
npm install --save-dev jest-serializer-react-helmet-async
or yarn:
yarn add --dev jest-serializer-react-helmet-async
Configure Jest to use the serializer in jest.config.js
:
module.exports = {
snapshotSerializers: ["jest-serializer-react-helmet-async"],
};
or package.json
:
{
"jest": {
"snapshotSerializers": ["jest-serializer-react-helmet-async"]
}
}
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:
import * as React from "react";
import renderer from "react-test-renderer";
import { HelmetProvider } from "react-helmet-async";
describe("App", () => {
it("renders as expected", () => {
const context = {};
const tree = renderer
.create(
<HelmetProvider context={context}>
<App />
</HelmetProvider>
)
.toJSON();
expect(tree).toMatchSnapshot();
expect(context.helmet).toMatchSnapshot();
});
});
jest-runner-prettier
- Use Jest to check your codebase against prettier
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 of webpack
's raw-loader
Copyright 2019 Kepler Sticka-Jones. Licensed ISC
FAQs
Serializer to display react-helmet-async data in Jest Snapshots
The npm package jest-serializer-react-helmet-async receives a total of 4,011 weekly downloads. As such, jest-serializer-react-helmet-async popularity was classified as popular.
We found that jest-serializer-react-helmet-async 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.