Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
redux-devtools-test-generator
Advanced tools
Watch my presentation at React Europe to see how it works.
npm install --save-dev redux-devtools-test-generator
Use with redux-devtools
and redux-devtools-inspector
(support for Redux DevTools Extension will come later).
containers/DevTools.js
import React from 'react';
import { createDevTools } from 'redux-devtools';
import Inspector from 'redux-devtools-inspector';
import TestGenerator from 'redux-devtools-test-generator';
import mochaTemplate from 'redux-devtools-test-generator/lib/redux/mocha'; // If using default tests.
export default createDevTools(
<Inspector
customTabs={[
{
name: 'Test',
component: <TestGenerator expect={mochaTemplate.expect} wrap={mochaTemplate.wrap} useCodemirror />
}
]}
/>
);
Instead of mochaTemplate.expect
and mochaTemplate.wrap
you can use your function templates.
If useCodemirror
specified, include codemirror/lib/codemirror.css
style and optionally themes from codemirror/theme/
.
Name | Description |
---|---|
assertion | String template or function with an object argument containing action , prevState , curState keys, which returns a string representing the assertion (see the function or template). |
[wrap ] | Optional string template or function which gets assertions argument and returns a string (see the example function or template). |
[useCodemirror ] | Boolean. If specified will use codemirror styles. |
[theme ] | String. Name of the codemirror theme. |
MIT
If you like this, follow @mdiordiev on twitter.
FAQs
Generate tests for redux devtools.
The npm package redux-devtools-test-generator receives a total of 56 weekly downloads. As such, redux-devtools-test-generator popularity was classified as not popular.
We found that redux-devtools-test-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.