
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-svg-mock
Advanced tools
A mock implementation of react-native-svg for use in tests. Inspired by react-native-mock.
With npm, do:
npm install react-native-svg-mock --save-dev
/* file-that-runs-before-all-of-my-tests.js */
// This will mutate `react-native-svg`'s require cache with `react-native-svg-mock`'s.
require('react-native-svg-mock/mock'); // <-- side-effects!!!
Or, with something like Mockery, do:
import mockery from "mockery";
import reactNativeSvgMock from "react-native-svg-mock";
mockery.enable();
mockery.registerMock("react-native-svg", reactNativeSvgMock);
In a test with Enzyme and Mocha, this could look like:
import "react-native-mock/mock";
import "react-native-svg-mock/mock";
import { render } from "enzyme";
import { expect } from "chai";
import { VictoryChart } from "victory-native";
describe("<VictoryChart />", function () {
it("should render", function () {
var component = render(<VictoryChart />);
expect(component).to.have.length(1);
});
});
FAQs
A mock implementation of react-native-svg for use in tests.
We found that react-native-svg-mock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 22 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.