{"_id":"redux-mock-store-await-actions","_rev":"52-b5f012f72ff977e1389547cd1613c073","name":"redux-mock-store-await-actions","description":"Waits for specific actions to be dispatched or a timeout expires.","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"redux-mock-store-await-actions","description":"Waits for specific actions to be dispatched or a timeout expires.","version":"1.0.0","keywords":["redux","test","mock","action","wait","timeout"],"author":{"name":"André Costa Lima","email":"andre.lima@moxy.studio"},"homepage":"https://github.com/moxystudio/redux-mock-store-await-actions","repository":{"type":"git","url":"git+ssh://git@github.com/moxystudio/redux-mock-store-await-actions.git"},"license":"MIT","scripts":{"lint":"eslint .","test":"jest --env node --coverage","posttest":"npm run lint","precommit":"lint-staged","prerelease":"npm t","release":"standard-version"},"standard-version":{"scripts":{"posttag":"git push --follow-tags origin master"}},"lint-staged":{"*.js":"eslint"},"dependencies":{"lodash":"^4.17.4"},"devDependencies":{"babel-plugin-transform-async-to-generator":"^6.24.1","babel-plugin-transform-runtime":"^6.23.0","babel-preset-es2015":"^6.22.0","eslint":"^4.3.0","eslint-config-moxy":"^3.0.0","husky":"^0.14.3","jest":"^21.2.1","lint-staged":"^4.0.2","redux":"^3.7.2","redux-mock-store":"^1.2.3","redux-thunk":"^2.2.0","standard-version":"^4.2.0"},"gitHead":"2789f9f37fc296b97890831fdd875233a106755c","bugs":{"url":"https://github.com/moxystudio/redux-mock-store-await-actions/issues"},"_id":"redux-mock-store-await-actions@1.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"acostalima","email":"andreclima.pt@gmail.com"},"dist":{"integrity":"sha512-OlQhkMb5pVCqymb/kyGnLE/M7qYyf7ihRMfpZX1ixi2qQ+1Ei3reRAIN/M2zui8uRmfI7gjRZnkRlvt5hU2l4w==","shasum":"de16403036d13052d2584a59d76181997e999dc4","tarball":"https://registry.npmjs.org/redux-mock-store-await-actions/-/redux-mock-store-await-actions-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbQ9IxWyhyb06XgH/rLqXO7bIZyfHzd4brinDVmiXZSQIhAOMr3AtXZDJDwoyFydD0KkLHMde81jIxnEssD2Cd/R98"}]},"maintainers":[{"name":"acostalima","email":"andreclima.pt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-mock-store-await-actions-1.0.0.tgz_1508500536830_0.20087296282872558"},"directories":{},"deprecated":"deprecated in favor of @moxy/redux-await-actions"},"2.0.0":{"name":"redux-mock-store-await-actions","description":"Waits for specific actions to be dispatched or a timeout expires.","version":"2.0.0","keywords":["redux","test","mock","action","wait","timeout"],"author":{"name":"André Costa Lima","email":"andre.lima@moxy.studio"},"homepage":"https://github.com/moxystudio/redux-mock-store-await-actions","repository":{"type":"git","url":"git+ssh://git@github.com/moxystudio/redux-mock-store-await-actions.git"},"license":"MIT","main":"index.js","scripts":{"lint":"eslint .","test":"jest --env node --coverage","prerelease":"npm t && npm run lint","release":"standard-version","precommit":"lint-staged","commitmsg":"commitlint -e $GIT_PARAMS"},"standard-version":{"scripts":{"posttag":"git push --follow-tags origin master && npm publish"}},"lint-staged":{"*.js":["eslint --fix","git add"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"dependencies":{"lodash":"^4.17.4"},"devDependencies":{"@commitlint/cli":"^6.0.1","@commitlint/config-conventional":"^6.0.2","eslint":"^4.3.0","eslint-config-moxy":"^4.1.0","husky":"^0.14.3","jest":"^22.0.0","lint-staged":"^6.0.0","redux":"^3.7.2","redux-mock-store":"^1.2.3","redux-thunk":"^2.2.0","standard-version":"^4.2.0"},"gitHead":"ffcdfb49b0e7c57358b09d998443ad4125143d21","bugs":{"url":"https://github.com/moxystudio/redux-mock-store-await-actions/issues"},"_id":"redux-mock-store-await-actions@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"acostalima","email":"andreclima.pt@gmail.com"},"dist":{"integrity":"sha512-P73O0Koci+5rV2ucdQG2KEa/5ZVmxIDCC/vmMWf2hfjieTsj7umA1eyHsm/sB5/cs3A2KBElJ31RoRY3ZD1Qww==","shasum":"082f818e2fe1ed21a8ed12c1510aea1dd84224d0","tarball":"https://registry.npmjs.org/redux-mock-store-await-actions/-/redux-mock-store-await-actions-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyo6JCxrfWg3vn1W7ukCn0lVrFBem5ZOvkPRWNwuxKUwIgTyHqbni2iQesyLDYJ67ZIkLwyBtf2haJMKFa6p6zbwY="}]},"maintainers":[{"email":"andreclima.pt@gmail.com","name":"acostalima"},{"email":"ivolimasilva@outlook.com","name":"ivolimasilva"},{"email":"paulobmarcos@outlook.com","name":"paulobmarcos"},{"email":"ruimpmonteiro12345@gmail.com","name":"ruimonteiro"},{"email":"fsdiogo@gmail.com","name":"fsdiogo"},{"email":"nelsonfonseca.18@gmail.com","name":"nlfonseca"},{"email":"andre.neves@moxy.studio","name":"andreneves"},{"email":"jonnybel91@gmail.com","name":"jonnybel"},{"email":"rui.neves@moxy.studio","name":"ruipneves"},{"email":"andregoncalves20007@gmail.com","name":"andregoncalvesdev"},{"email":"antonio.c.capelo@gmail.com","name":"capelo"},{"email":"santos.vasco10@gmail.com","name":"vascosantos"},{"email":"marcooliveira@me.com","name":"marcooliveira"},{"email":"andremiguelcruz@msn.com","name":"satazor"},{"email":"filipediasferreira@me.com","name":"filipediasf"},{"email":"hello@moxy.studio","name":"moxyhq"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-mock-store-await-actions-2.0.0.tgz_1517508425673_0.7848936812952161"},"directories":{},"deprecated":"deprecated in favor of @moxy/redux-await-actions"},"2.0.1":{"name":"redux-mock-store-await-actions","description":"Waits for specific actions to be dispatched or a timeout expires.","version":"2.0.1","keywords":["redux","test","mock","action","wait","timeout"],"author":{"name":"André Costa Lima","email":"andre.lima@moxy.studio"},"homepage":"https://github.com/moxystudio/redux-mock-store-await-actions","repository":{"type":"git","url":"git+ssh://git@github.com/moxystudio/redux-mock-store-await-actions.git"},"license":"MIT","main":"index.js","scripts":{"lint":"eslint .","test":"jest --env node --coverage","prerelease":"npm t && npm run lint","release":"standard-version","precommit":"lint-staged","commitmsg":"commitlint -e $GIT_PARAMS"},"standard-version":{"scripts":{"posttag":"git push --follow-tags origin master && npm publish"}},"lint-staged":{"*.js":["eslint --fix","git add"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"dependencies":{"lodash":"^4.17.4"},"devDependencies":{"@commitlint/cli":"^6.0.1","@commitlint/config-conventional":"^6.0.2","eslint":"^4.3.0","eslint-config-moxy":"^5.0.0","husky":"^0.14.3","jest":"^22.0.0","lint-staged":"^6.0.0","redux":"^3.7.2","redux-mock-store":"^1.2.3","redux-thunk":"^2.2.0","standard-version":"^4.2.0"},"gitHead":"260a8fb4bbbbd3193077e69347af5d2940259eb9","bugs":{"url":"https://github.com/moxystudio/redux-mock-store-await-actions/issues"},"_id":"redux-mock-store-await-actions@2.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"acostalima","email":"andreclima.pt@gmail.com"},"dist":{"integrity":"sha512-jkmW8YDgiwzfRFoeawRgoyah216oyhnbnVFl6TGqGbIqhmGOmmtaSATNndNTZ1DP/AgfEApRImw5RuEeOCIaTQ==","shasum":"53d5fc2e119ede9be04e8dab54f8bd7c0ad058ea","tarball":"https://registry.npmjs.org/redux-mock-store-await-actions/-/redux-mock-store-await-actions-2.0.1.tgz","fileCount":13,"unpackedSize":27468,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKcYSgTIz7OPkHFSuNvOwk+yhDUr9WvFZjsDHuA3+MAwIgExGOsrL5zS0/d6PmQt0ExFsxJQANWutRp6bIp8Cw2lo="}]},"maintainers":[{"email":"andreclima.pt@gmail.com","name":"acostalima"},{"email":"andregoncalves20007@gmail.com","name":"andregoncalvesdev"},{"email":"andre.neves@moxy.studio","name":"andreneves"},{"email":"antonio.c.capelo@gmail.com","name":"capelo"},{"email":"filipediasferreira@me.com","name":"filipediasf"},{"email":"fsdiogo@gmail.com","name":"fsdiogo"},{"email":"ivolimasilva@outlook.com","name":"ivolimasilva"},{"email":"jonnybel91@gmail.com","name":"jonnybel"},{"email":"marcooliveira@me.com","name":"marcooliveira"},{"email":"hello@moxy.studio","name":"moxyhq"},{"email":"nelsonfonseca.18@gmail.com","name":"nlfonseca"},{"email":"paulobmarcos@outlook.com","name":"paulobmarcos"},{"email":"ruimpmonteiro12345@gmail.com","name":"ruimonteiro"},{"email":"rui.neves@moxy.studio","name":"ruipneves"},{"email":"andremiguelcruz@msn.com","name":"satazor"},{"email":"santos.vasco10@gmail.com","name":"vascosantos"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-mock-store-await-actions_2.0.1_1517997520506_0.22089291583814763"},"_hasShrinkwrap":false,"deprecated":"deprecated in favor of @moxy/redux-await-actions"},"2.1.0":{"name":"redux-mock-store-await-actions","description":"Waits for specific actions to be dispatched or a timeout expires.","version":"2.1.0","keywords":["redux","test","mock","action","wait","timeout"],"author":{"name":"André Costa Lima","email":"andre.lima@moxy.studio"},"homepage":"https://github.com/moxystudio/redux-mock-store-await-actions","repository":{"type":"git","url":"git+ssh://git@github.com/moxystudio/redux-mock-store-await-actions.git"},"license":"MIT","main":"index.js","scripts":{"lint":"eslint .","test":"jest --env node --coverage","prerelease":"npm t && npm run lint","release":"standard-version","precommit":"lint-staged","commitmsg":"commitlint -e $GIT_PARAMS"},"standard-version":{"scripts":{"posttag":"git push --follow-tags origin master && npm publish"}},"lint-staged":{"*.js":["eslint --fix","git add"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"dependencies":{"lodash":"^4.17.4"},"devDependencies":{"@commitlint/cli":"^6.0.1","@commitlint/config-conventional":"^6.0.2","eslint":"^4.3.0","eslint-config-moxy":"^5.0.0","husky":"^0.14.3","jest":"^22.0.0","lint-staged":"^6.0.0","redux":"^3.7.2","redux-mock-store":"^1.2.3","redux-thunk":"^2.2.0","standard-version":"^4.2.0"},"gitHead":"bd59e91a788f541b90474a651dc14d40eb2c2a82","bugs":{"url":"https://github.com/moxystudio/redux-mock-store-await-actions/issues"},"_id":"redux-mock-store-await-actions@2.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"acostalima","email":"andreclima.pt@gmail.com"},"dist":{"integrity":"sha512-XtOt4U8+gqMUjYqKl4gRkkOxlyPKTqi2NzDJuZikBgRY989s+21/QGNhMjYf7ry1C9fiPwpSyYo4t2Le5QTyNQ==","shasum":"d716fc96d059aa71b18691f4330f264dbaed12e9","tarball":"https://registry.npmjs.org/redux-mock-store-await-actions/-/redux-mock-store-await-actions-2.1.0.tgz","fileCount":14,"unpackedSize":33055,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCL8wCn7QJPXpEXmda4VL/ZKIu6yDvNwFZjZ4NaFINGigIgTyDPZwkPgI49LIpa6kza0VvKkWryluJ/rEsRd+tq7bo="}]},"maintainers":[{"email":"andreclima.pt@gmail.com","name":"acostalima"},{"email":"a.reis_05@hotmail.com","name":"afonsovreis"},{"email":"andregoncalves20007@gmail.com","name":"andregoncalvesdev"},{"email":"andre.neves@moxy.studio","name":"andreneves"},{"email":"antonio.c.capelo@gmail.com","name":"capelo"},{"email":"filipediasferreira@me.com","name":"filipediasf"},{"email":"fsdiogo@gmail.com","name":"fsdiogo"},{"email":"ivolimasilva@outlook.com","name":"ivolimasilva"},{"email":"jonnybel91@gmail.com","name":"jonnybel"},{"email":"marcooliveira@me.com","name":"marcooliveira"},{"email":"hello@moxy.studio","name":"moxyhq"},{"email":"nelsonfonseca.18@gmail.com","name":"nlfonseca"},{"email":"paulobmarcos@outlook.com","name":"paulobmarcos"},{"email":"ruimpmonteiro12345@gmail.com","name":"ruimonteiro"},{"email":"rui.neves@moxy.studio","name":"ruipneves"},{"email":"andremiguelcruz@msn.com","name":"satazor"},{"email":"santos.vasco10@gmail.com","name":"vascosantos"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-mock-store-await-actions_2.1.0_1518782562644_0.5160602640794427"},"_hasShrinkwrap":false,"deprecated":"deprecated in favor of @moxy/redux-await-actions"}},"readme":"# redux-mock-store-await-actions\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url]\n\n[npm-url]:https://npmjs.org/package/redux-mock-store-await-actions\n[npm-image]:http://img.shields.io/npm/v/redux-mock-store-await-actions.svg\n[downloads-image]:http://img.shields.io/npm/dm/redux-mock-store-await-actions.svg\n[travis-url]:https://travis-ci.org/moxystudio/redux-mock-store-await-actions\n[travis-image]:http://img.shields.io/travis/moxystudio/redux-mock-store-await-actions/master.svg\n[codecov-url]:https://codecov.io/gh/moxystudio/redux-mock-store-await-actions\n[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/redux-mock-store-await-actions/master.svg\n[david-dm-url]:https://david-dm.org/moxystudio/redux-mock-store-await-actions\n[david-dm-image]:https://img.shields.io/david/moxystudio/redux-mock-store-await-actions.svg\n[david-dm-dev-url]:https://david-dm.org/moxystudio/redux-mock-store-await-actions?type=dev\n[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/redux-mock-store-await-actions.svg\n[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/redux-mock-store-await-actions.svg\n[greenkeeper-url]:https://greenkeeper.io\n\n> Waits for specific actions to be dispatched or a timeout expires.\n\n**NOTE:** This module only works with [redux-mock-store](https://github.com/arnaudbenard/redux-mock-store) and shall only be used for testing purposes. Support for real Redux store is not provided.\n\n\n## Installation\n\n`$ npm install redux-mock-store-await-actions --save-dev`\n\n\n## Motivation\n\nConsider the following example:\n\n```js\nfunction login(username, password) {\n    return async (dispatch) => {\n        dispatch({ type: 'LOGIN_START', payload: { username, password } });\n\n        try {\n            const user = await fetch('/login', {\n                headers: { 'Content-Type': 'application/json' },\n                method: 'POST',\n                body: JSON.stringify({ username, password })\n            });\n\n            dispatch({ type: 'LOGIN_SUCCESS', payload: user });\n        } catch (err) {\n            dispatch({ type: 'LOGIN_FAIL', payload: err });\n            throw err;\n        }\n\n        // Fetch orders asynchronously, not waiting for them to be retrieved\n        dispatch(fetchOrders());\n    }\n}\n\nfunction fetchOrders() {\n    return async (dispatch) => {\n        dispatch({ type: 'FETCH_ORDERS_START' });\n\n        try {\n            const orders = await fetch('/account/orders');\n\n            dispatch({ type: 'FETCH_ORDERS_SUCCESS', payload: orders });\n        } catch (err) {\n            dispatch({ type: 'FETCH_ORDERS_FAIL', payload: err });\n            throw err;\n        }\n    }\n}\n\nstore.dispatch(login('my-username', 'my-password'));\n\nexpect(store.getActions()).toContain([\n    'LOGIN_START',\n    'FETCH_ORDERS_SUCCESS'\n]);\n```\n\nThe assertion above will fail because `FETCH_ORDERS_SUCCESS` will not yet exist in the stack of actions.\nTo solve this, one can use `setTimeout` explicitly in each test:\n\n```js\nstore.dispatch(login('my-username', 'my-password'));\n\nsetTimeout(() => expect(store.getActions()).toContain([\n    'LOGIN_START',\n    'FETCH_ORDERS_SUCCESS'\n]), 50);\n```\n\nHowever, this is not pretty and is error-prone. `redux-mock-store-await-actions` makes this easier for you.\n\n\n## Usage\n\n### Example #1: action types\n\nSupply the action types to await for.\n\n```js\nimport waitForActions from 'redux-mock-store-await-actions';\nimport configureStore from 'redux-mock-store';\nimport thunkMiddleware from 'redux-thunk';\n\nconst store = configureStore([thunkMiddleware])();\n\nstore.dispatch(login('my-username', 'my-password'));\n\nawait waitForActions(store, ['LOGIN_START', 'FETCH_ORDERS_SUCCESS']);\n```\n\n\n### Example #2: action objects\n\nSupply the action objects to await for, matching a subset of the properties of the dispatched actions. It performs a deep comparison between property values of dispatched and expected actions to determine whether the expected actions are partially contained in the stack of dispatched actions.\n\n```js\nimport waitForActions from 'redux-mock-store-await-actions';\nimport configureStore from 'redux-mock-store';\nimport thunkMiddleware from 'redux-thunk';\n\nconst store = configureStore([thunkMiddleware])();\n\nstore.dispatch(login('my-username', 'my-password'));\n// { type: 'LOGIN_START', payload: { username: 'my-username' } }\n// matches\n// { type: 'LOGIN_START', payload: { username: 'my-username', password } }\n//\n// { type: 'FETCH_ORDERS_SUCCESS', }\n// matches\n// { type: 'FETCH_ORDERS_SUCCESS', payload: orders }\n\nawait waitForActions(store, [\n    {\n        type: 'LOGIN_START',\n        payload: { username: 'my-username' },\n    },\n    {\n        type: 'FETCH_ORDERS_SUCCESS',\n    },\n\n]);\n```\n\n\n## API\n\n### waitForActions(store, actions, [options])\n\nReturns a `Promise` which fulfills if all `actions` are dispatched before the timeout expires. The `Promise` has a `.cancel()` function which, if called, will reject the `Promise`.\n\nThe `Promise` might be rejected:\n\n* as a result of timeout expiration, throwing `TimeoutError`\n* as a result of `.cancel()` invocation, throwing `CancelledError`\n* when the action's matcher throws `MismatchError`\n\n**NOTE:** Subsequent calls to `waitForActions` with the same actions should be preceded by a call to `store.clearActions()`, otherwise the returned `Promise` will resolve immediately.\n\n#### store\n\nType: `Object`\n\nThe `redux-mock-store`.\n\n#### actions\n\nType: `Object` `String` `Array` `Function`\n\nThe actions to wait for. It can be either:\n\n* `String`: an action type string.\n* `Object`: an action object.\n* `Array` of either\n    * action objects;\n    * action type strings;\n    * action objects mixed with action type strings.\n\n#### options\n\n##### timeout\n\nType: `Number`   \nDefault: 2000\n\nThe timeout given in milliseconds.\n\n##### throttleWait\n\nType: `Number`   \nDefault: 0\n\nSpecifies the time in milliseconds that every invocation to the action's matcher take place at since the last invocation. When set to zero, throttling is disabled.\n\nWhen throttling is enabled, the `matcher` will be called at most once per `throttleWait` milliseconds receiving the array of actions dispatched until that time. If the `matcher` does not resolve the `Promise` until `timeout` milliseconds have elapsed, the `Promise` is rejected throwing `TimeoutError`.\nThis feature is useful when one needs to wait for several actions or a burst of actions to be dispatched, effectively skip invocations to the action's matcher until the Redux store \"settles\" to avoid running complex action comparison logic in the meantime and improve performance.\n\n##### matcher\n\nType: `Function`   \nDefault: `.matchers.order`\n\nSupplies custom behavior to specify how expected and dispatched actions should be compared. The function accepts two arguments: the array of expected actions and dispatched actions.\n\nThe matcher must either:\n\n* return `true` to indicate a match has occurred and fulfill the `Promise`\n* return `false` to indicate a match is yet to occur and the `Promise` remains in pending state\n* throw `MismatchError` to indicate a match will not occur anymore and reject the `Promise`\n\nTwo built-in matchers are already shipped and available under `.matchers` property:\n\n* `order` matcher performs a comparison between the specified order of expected actions against the order of arrival of dispatched actions. On the first mismatch detected, `MismatchError` is thrown for early rejection\n* `containing` matcher is a less strict matcher which checks whether expected actions are contained within dispatched actions\n\nBoth matchers perform a *partial deep comparison* between dispatched and expected actions, as per [Lodash's isMatch()](https://lodash.com/docs/4.17.4#isMatch).\n\nExample of a custom matcher implementation:\n\n```js\nimport waitForActions from 'redux-mock-store-await-actions';\nimport configureStore from 'redux-mock-store';\nimport thunkMiddleware from 'redux-thunk';\n\nconst store = configureStore([thunkMiddleware])();\nconst expectedActions = [\n    { type: 'LOGIN_START', payload: { username: 'my-username' } },\n    { type: 'FETCH_ORDERS_SUCCESS' }\n];\n\nstore.dispatch(login('my-username', 'my-password'));\n// Throws if LOGIN_FAIL is dispatched or\n// Matches when LOGIN_START and FETCH_ORDERS_SUCCESS are dispatched\n\nwaitForActions(store, expectedActions, { matcher: (expectedActions, storeActions) => {\n    const hasLoginFail = storeActions.some((action) => action.type === 'LOGIN_FAIL');\n\n    if (hasLoginFail) {\n        throw new waitForActions.MismatchError();\n    }\n\n    const hasLoginStart = storeActions.some((action) => action.type === 'LOGIN_START' && action.payload.username === 'my-username');\n    const hasFetchOrdersSuccess = storeActions.some((action) => action.type === 'FETCH_ORDERS_SUCCESS');\n\n    return hasLoginStart && hasFetchOrdersSuccess;\n}})\n.then(() => {\n    // Expected actions dispatched\n})\n.catch((err) => {\n    // MismatchError\n});\n```\n\n## Tests\n\n`$ npm test`   \n`$ npm test -- --watch` during development\n\n\n## License\n\n[MIT License](http://opensource.org/licenses/MIT)\n","maintainers":[{"email":"tiagoddinis@gmail.com","name":"tiagodinis"},{"email":"hello@moxy.studio","name":"moxyhq"},{"email":"filipediasferreira@me.com","name":"filipediasf"},{"email":"andremiguelcruz@msn.com","name":"satazor"},{"email":"marcooliveira@me.com","name":"marcooliveira"},{"email":"andreclima.pt@gmail.com","name":"acostalima"},{"email":"andregoncalves20007@gmail.com","name":"andregoncalvesdev"}],"time":{"modified":"2022-05-15T15:33:37.676Z","created":"2017-10-20T11:55:37.861Z","1.0.0":"2017-10-20T11:55:37.861Z","2.0.0":"2018-02-01T18:07:05.738Z","2.0.1":"2018-02-07T09:58:41.166Z","2.1.0":"2018-02-16T12:02:42.871Z"},"homepage":"https://github.com/moxystudio/redux-mock-store-await-actions","keywords":["redux","test","mock","action","wait","timeout"],"repository":{"type":"git","url":"git+ssh://git@github.com/moxystudio/redux-mock-store-await-actions.git"},"author":{"name":"André Costa Lima","email":"andre.lima@moxy.studio"},"bugs":{"url":"https://github.com/moxystudio/redux-mock-store-await-actions/issues"},"license":"MIT","readmeFilename":"README.md"}