
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
[](https://travis-ci.com/doniyor2109/jest-redux) [](https://github.com/doniyor2109/jest-redux/blob/master/
Jest matchers for testing redux easier and more declaritive.
yarn add --dev jest-redux
or
npm install --save-dev jest-redux
setupTestFrameworkScriptFile
configAdd jest-redux
to your Jest setupTestFrameworkScriptFile
configuration
"jest": {
"setupTestFrameworkScriptFile": "jest-redux"
}
setupTest
scriptRequire jest-redux
from setupTest script
// ./setupTest.js
require('jest-redux');
Then add this config
"jest": {
"setupTestFrameworkScriptFile": "./setupTest.js"
}
Test your standart redux actions and reducers with one of the jest-redux
matchers.
const initialState = { number: 0 };
function reducer(state = initialState, action) {
switch(action.type) {
case "ADD":
return state.number + action.payload;
default:
return state;
}
}
expect(reducer).toHaveInitialState(initialState); // Passes tests
toHandleActions(reducer, actionCreators)
Checks reducer to handle given actionCreators.
expect(reducer).toHandleActions(actions);
toHaveInitialState(reducer, initialState)
Checks reducer against given intitialState.
expect(reducer).toHaveInitialState(initialState);
toMatchActionCreatorsSnapshot(actionCreators)
Checks given action creators to match with previous snapshot.
expect(actionCreators).toMatchActionCreatorsSnapshot();
MIT
FAQs
Jest matchers for testing redux easier and more declaritive.
The npm package jest-redux receives a total of 0 weekly downloads. As such, jest-redux popularity was classified as not popular.
We found that jest-redux 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
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.