npm.io
1.0.5 • Published 8 years ago

@mt-testutils/mock-store

Licence
MIT
Version
1.0.5
Deps
0
Size
4 kB
Vulns
0
Weekly
0

mock-store

Simple utility function to create a mock Redux store, to be used for unit tests.

Installation

npm install --save-dev @mt-testutils/mock-store

Usage

import createMockStore from '@mt-testutils/mock-store';

// Initial Redux state for the mock store, defaults to {} if omitted  
const state = {
    foo: 'bar'
};

const mockStore = createMockStore(state);

Change Log

Contribution Guidelines

License

MIT licensed

Copyright 2018 mobile.de GmbH