react-mock
react-mock copied to clipboard
Declarative mocks for React state and global APIs
Hi. Love the look of this project, and I'd really like to use it on a React app I'm working on with Typescript. However, I get the following error when...
Hi, I'm trying to mock state in jest. Here is my hook example code: ``` javascript // ReactMock.jsx import React, { useState } from 'react'; const ReactMock = () =>...
Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.1 to 2.2.4. Release notes Sourced from https-proxy-agent's releases. 2.2.4 Patches Add .editorconfig file: a0d4a20458498fc31e5721471bd2b655e992d44b Add .eslintrc.js file: eecea74a1db1c943eaa4f667a561fd47c33da897 Use a net.Socket instead of a plain EventEmitter...
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4. Commits 6370e90 Mark version 5.7.4 fbc15b1 More rigorously check surrogate pairs in regexp validator See full diff in compare view [](https://help.github.com/articles/configuring-automated-security-fixes) Dependabot...
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. Commits - [`754f0c2`](https://github.com/jonschlinkert/mixin-deep/commit/754f0c20e1bc13ea5a21a64fbc7d6ba5f7b359b9) 1.3.2 - [`90ee1fa`](https://github.com/jonschlinkert/mixin-deep/commit/90ee1fab375fccfd9b926df718243339b4976d50) ensure keys are valid when mixing in values - See full diff in [compare view](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2) Maintainer changes This...
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2. Commits - [`4e1bc07`](https://github.com/mysticatea/eslint-utils/commit/4e1bc077c2a6bb00538d66b69a63c24de3463bed) 1.4.2 - [`e4cb014`](https://github.com/mysticatea/eslint-utils/commit/e4cb01498df6096b66edb0c78965ee6f47d3ac77) 🐛 add null test - [`230a4e2`](https://github.com/mysticatea/eslint-utils/commit/230a4e2275cde169cbfbb95cd2e4de2152fae0a2) 1.4.1 - [`08158db`](https://github.com/mysticatea/eslint-utils/commit/08158db1c98fd71cf0f32ddefbc147e2620e724c) 🐛 fix getStaticValue security issue - [`587cca2`](https://github.com/mysticatea/eslint-utils/commit/587cca2f82c245f5fc4a8b9fb2cf6b35c0d02552) 🐛 fix...
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0. Commits - [`ab73503`](https://github.com/lodash/lodash/commit/ab73503859a2d2f7f603bc8a293ce93ecc071e83) Bump to v4.5.0. - [`a4f7d4c`](https://github.com/lodash/lodash/commit/a4f7d4cc2a3b6d3a43f6c27beadbf90410eecdcd) Rebuild lodash and docs. - [`cca5ac6`](https://github.com/lodash/lodash/commit/cca5ac60d61a2f786eeafadb674d6e12fc6179c8) Fix npm-test by removing the call to test-docs. - [`9f7f9fc`](https://github.com/lodash/lodash/commit/9f7f9fc3c5f1a4db9a2134950872440c792ee8bb)...
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1. Changelog *Sourced from [js-yaml's changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md).* > 3.13.1 / 2019-04-05 > ------------------- > > - Fix possible code execution in (already unsafe) `.load()`, [#480](https://github-redirect.dependabot.com/nodeca/js-yaml/issues/480). >...
Bumps [fstream](https://github.com/npm/fstream) from 1.0.11 to 1.0.12. Commits - [`4235459`](https://github.com/npm/fstream/commit/42354590e23bb514eb5c869eea64406be2947c6c) 1.0.12 - [`6a77d2f`](https://github.com/npm/fstream/commit/6a77d2fa6e1462693cf8e46f930da96ec1b0bb22) Clobber a Link if it's in the way of a File - See full diff in [compare view](https://github.com/npm/fstream/compare/v1.0.11...v1.0.12)...
## What's up? [At the moment](https://github.com/skidding/react-mock/blob/1cf7f6c7518894f1595ebbb791955238861ef20d/packages/state/src/index.js#L66-L75) StateMock replaces component state entirely. This means that initial component state is discarded, and only the mocked state values remain. While this may be...