{"_id":"jest-react-hooks-shallow","_rev":"9-82263719e8f5ff59db37bd8dd7741a60","name":"jest-react-hooks-shallow","dist-tags":{"latest":"1.5.1"},"versions":{"1.0.0":{"name":"jest-react-hooks-shallow","version":"1.0.0","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test":"jest","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.2.1","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"d4f37e663e67271694cc47ff4868ce27c4b9adc2","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.1","_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"dist":{"integrity":"sha512-pIm5V2m/7DfcnyjVhLHWx82IN1Ak0Q2572lIyuG66HHUztRvXDuOUEFEyoEAkgl6OuE7+J3cLo58DX/SFrrORA==","shasum":"06b133fb5b629d09f74c8ea71e369dbcb116c7da","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.0.0.tgz","fileCount":15,"unpackedSize":12551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYY57CRA9TVsSAnZWagAAWYEP/1KUIPDpzWIbcOuzui3l\nauhmxiiwe7o9rQclAio+5f+HfLYHiU/qSbOoAKvvAbON6u2cvMSCe8nees0W\ng5Emo0DYW5kWCseykQBJLiPJaMVuhR2U+XdDmgpPoDnRnRWsteJPt7nEmICS\nekG+bTIlmKmAtX3Pz7CNyQUXDuymeV+zbJJig7kMJKb9d8FRBzSF8MLVfJfK\n6zROu4wmOOPeU1QXcaF8Z7rMBPfjr7prUPnjY2lWkJ0N8481JVcov8m+uiao\nVRgyOWvZaELU4qKnY/dkynsfWiuQQTMFFvJsX8OqKFKb0eipL6b78yVlGfUm\nItTN45FttRxDDwpF6sWErsmaHhBUU2AMCrE3pznMntOHN8Cgo0bAYKP5shRv\nO+Y9AyhcWWTAJJmkrYEPs0+EG5lfqsLUf+stqiO6Hl5uHevPNRBm07nON3s4\nDst+VC+NJhe8J0Pnjr4u3twmrVLC6Jl3cJbL4vmySEkAYY5B/7ir45Cbc29j\nll6MHNMXXPnruKqys2Lb5piB+CnlheHdeFovP2p8UYZR8ODYCwgCOt9qeWNg\nrcsWnYhP+rYlUF6g50DO5MQVznfE7tT4aJuKM0ZPEdGN1KDaWBROPeydh7GK\nLelVrtjVXN+/kXD1J/M6TT98jVaI9vFhLzy0dnJ8IBza+/+nQFsJ5h+b7lTc\nQlGv\r\n=9MYd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDorR3Qj4wmUZ7QJyETnZaeH4NkclGmlVDv9rrylGpakAiAlQhVN6iPhTegOvwDoUh+D3v7RR/ENxZe4nZRoGtbfBg=="}]},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.0.0_1583451770666_0.7917723065797928"},"_hasShrinkwrap":false},"1.1.0":{"name":"jest-react-hooks-shallow","version":"1.1.0","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test":"jest","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.2.1","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"c724ecafb297fb190d0a6c7357fc463223dc505e","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.1","_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"dist":{"integrity":"sha512-EyNbiAcOYVbN8RjKIoSIzvglqgV6nS3n5n3aLwFc+oB2Qy2sI6ICM/LKFHkOFQr8IMmS+3oA+xaQFbjrQtBVog==","shasum":"5eff731999ab1a78782db8461ef8e5a010ba999a","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.1.0.tgz","fileCount":15,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeY4vnCRA9TVsSAnZWagAAkysQAIJAeE56eBNNnk11QLhJ\nCEl0Ng865GZr+SNB9pXC4vfic/BBs2IIKEkOCKhdnsB3/hsNwu+Kx1o5ronz\n2BdXexybpQ9Tj33yoFPunZhA6rEJapsYlcM+pLNFWirV3riphWYfT0b6OatB\nJfv+8RJk+hvVOH8zA7NsjHsbX4LDTfR0wj5pZ/54pM4CRG6LPhZyLtLSPjy6\nvIwC2Kjop4IEh2/cm43uTAP4CN7S0HjhMT4iLJSFVy2YyGUE1x+AUO5ahELJ\n74jnXdJCv++uI9ZKScTlkc0Bcw8NeDvA1hFitaSDpramMWO3cmkpUbUdgQGA\nNuAm2Z7ezzrLq2KN81D/LGWqqyCmzjDvAkEQsF8PVR4EtKMtsI9IR+lniAyX\nv/zv5xE2EvsmQzsGzldI9xqzhrns3uJkchmR59mY0diQL0E3d6sF9hft/aw4\ni2SUyBWE9LwtT4sZQRkZPAQN0VY0hBljrDJx+2pTpjR9dUKnamv1bJxnztj+\ntbZjwt/9fS6cyV47GLJ5C0EwbLHePCQxsW2zu8vmVngd7vO7besgYsVY+www\nKyGW8QcJzLFBmrYtBF6F5QKBO9krGIKal7VMSU/lXTygYJpecuGsoUfRN1iB\n2zH99OhPj46WIilUmXmMXatix4r7a2UH5a7FiVOHyyTfQljtb/lOkBlsr2Cp\n6dE+\r\n=PZB1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFBwQg/1U+KQ7tZeFrl+ocgkhteSjWbbqBv1HfMiLIcaAiAP76nRfExgNl8INyiA8grRyQlw0/mnj/bU/d+XxmytvQ=="}]},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.1.0_1583582182563_0.26602623034523165"},"_hasShrinkwrap":false},"1.2.0":{"name":"jest-react-hooks-shallow","version":"1.2.0","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test:unit":"jest","test:e2e":"cd sample-tests-and-e2e-tests && npm i && npm test && cd ..","test":"npm run test:unit && npm run test:e2e","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.2.1","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"74dcce36ac42479a080be64dcbc5f30e1dec1b97","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.2.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.1","_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"dist":{"integrity":"sha512-xq8pLrnJ5X/VJZsclc9JSv1kdh9PTdcavcTnjP0mC8syN7FDRBdfB/p0Hp/Im2K4x66/kZU3L/c0lna7KsSN2A==","shasum":"91cff3d148ec3252dfada392fc8672eef2e7eb18","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.2.0.tgz","fileCount":30,"unpackedSize":22558,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaCjJCRA9TVsSAnZWagAAYDcP/0xS0Guh+dZTrt2sRiYM\nNHZ+NBK9gHfckn7iCTVKa50zSMdxgqHSobHZEFZQFIHke+zHFUTqNg42JFTo\nybQmb4Kyotkm4zzeo3cXxP5tyUpOfedfnbKJaJjxmlE7OHHtAGuuGy5xeblJ\nPckH9Y2DFxnlVKQWJY3qtEKnz8Tek/S1AhEmmENx0gDA7Om20HGPNwSu8DSV\nULh3Hb7Oievu2ldJAIuLSQly2owyY+Qh1QuuoGNkIfkyyO5fjGn1wuf6OKr+\n+FGIk4Omw8snhtGOkTZViYDFRYvaLERWDuvM9eLq33RgBWpgy5P0ulb5m5pl\nO5qp6+KAaYtIYnQthA+3lJQBMQOPJFd9SzxoL2UK225OXk3pZBbuI8JFlTCW\n/Wp50SZfv895cUpBauV71IlaPUPd7MyxK1eHhoNgJrIKzY3v5aK3SjCPab5G\nCKhcq9HbLeFVMc5q2jqTtLu2iorNaKUdpmFG/lXGH84ky0xV01/kT15kB6wx\nU69RpIj5KqMNPOM/s1XEAecdADj15GA3n40SR+BRmIlYgyVf1iOpd0LJKU15\nRnsjReOLVLquWv4Gi5N1d8tuMwz0zS+1SAxFUoYTCDUJSDX599BF4XJ0i5ab\n4oRLmFJMMYtUMxKYZoNS/3teBjmolghk4GD2WhqARMzsHS6XaEbxtmi3Adz1\nYeaC\r\n=03Iz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3mrtGQQoA4zFML03ktHGU7A/LV1+ehZIPDMJCt5Pq9wIgDLrU5ZhgUOx766zY3aqQDtybyVGfIgfl/KJRfBJgS/I="}]},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.2.0_1583884489111_0.12415964785169131"},"_hasShrinkwrap":false},"1.3.0":{"name":"jest-react-hooks-shallow","version":"1.3.0","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test:unit":"jest","test:e2e":"cd sample-tests-and-e2e-tests && npm i && npm test && cd ..","test":"npm run test:unit && npm run test:e2e","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.4.0","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"27eb725d6cc792072c1f8f560d6a226d11822d1d","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.3.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-seERyGrtUNUt4Pgd8ST2alIYUK29GOB6taxNeSvRjGLL9LdpCmmSYWVMUuDpeJO5Abo5gb0dtsB1AK0m/5tQYQ==","shasum":"c665fa30aefd40e7b25c4ccd0064f947a3fac0af","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.3.0.tgz","fileCount":33,"unpackedSize":635678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJervRFCRA9TVsSAnZWagAAciUP/396OczVP3QZAznk6XlE\no/kb2oIpGX1lgoLhhww084e8kDrvAda3UtgwqStq+Ow2B5RPguen2mL90H5Y\ndrpiJ+crtILk8MYu/e5HSQUvGUNOOvqamyXJr2w+Fl5OqaGdtyy06bqWijDC\nzbKN5/jILwmlTdPEjpwD7roYqfQH4aLo4dorDIEWfZ1Jf4WWCaaqBlWLEurk\nwKzaPBs6NSz0Ofi9VU+M/4qXH2c14wsPwMJ+Zv6hAUwMZB+w2AXxtEbNWX2J\nUS16WD0N3H88wo86i6bv136SC6m5Bk/VLD6vieFlS2pvsplwRKEnrM8sLE+J\n5Al2zoLXNxHIDx6ns2PVksK/ymv6cArSpaGCKTD4ltMO+0H9535WMRO9rU/G\nq328MxdhbUDzPWuQqlfFRXJ5jo8x2RZB9DkzKn8q1NR915QRxh5gM2HU/0bx\n4dan3HBLHNa8mcymrILKr4iAQrX3Iu5Ta1sX+aw1ycLMVcua/U2wUL5Bbvqw\nlFo5Cw4+HcFv8ktg7dyF83V6oDKaVGUOIVtc/Rmh1ThqJO3PrhU1SjxCWk8e\nV5PjGabPGB3mlyd4ATzl3voksJU1TGDV4FBvydDDlfE/oWWSu5GKz/6EiGYa\n0oybBBEE1z/2osgyxnHQ8j+YyugUzHCxiXiqfH9eWSw7rK+c5Xgb1CXG/Gyl\nNPcs\r\n=cURI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEFq/vH+npOJgvdj3XBA/vUx4+Hjx/xHH9tpMKRMVlkQIgSHxtMwtwVsEejfp7QCielKKqgSOqaVm3mggjWMHN0oI="}]},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.3.0_1588524100873_0.6527501352137814"},"_hasShrinkwrap":false},"1.4.0":{"name":"jest-react-hooks-shallow","version":"1.4.0","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test:unit":"jest","test:e2e:with-mocking-by-default":"cd samples-and-e2e-tests/with-mocking-by-default && npm i && npm test && cd ../..","test:e2e:without-mocking-by-default":"cd samples-and-e2e-tests/without-mocking-by-default && npm i && npm test && cd ../..","test:e2e":"npm run test:e2e:with-mocking-by-default && npm run test:e2e:without-mocking-by-default &","test":"npm run test:unit && npm run test:e2e","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.4.0","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"655485a0353f166aef0e1d6f6f448d6a9463118a","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.4.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WeNfoSJzHNZYCvJlu+2V5nJ9FYqAZ9K1YjU9LJMlOqYrIpWvNwLhqcM6LmPn4P9zLYncUyqpteIQL+L5mYZJ9Q==","shasum":"3e2f70f9b96e0b461d5d4baa4d21d6f007e68eed","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.4.0.tgz","fileCount":47,"unpackedSize":1265708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetrpQCRA9TVsSAnZWagAAlcYQAJWgcObYQKjt7WWTZvWx\nIRbZwNrXQ1e45mElvsmY7qzP+umHO5e6kvdg6k2fMr8NLFExjbWMvfUKnF2W\n0mXtWLaVeMbsf+pUmsQjFxOW82Ai1Bma2HBAA2PY7Gar2LZv3lXFAEdMuvZG\nb07pWlj73MjvcgzB2m2f/D+Zhgpdww+qkTiRczzsx3IipNNyo5ts+PgW1i/e\nXofklTCyQRuWOnK6q4bTBhGdXQoOwHmR4YmUrgZY6qzkc1G2pf04kr3M/fy5\n1gGoaWuqWWMCpXy4yNv0C38K4H2xvouPONii08c9CteM6n12wAnPkbtFAxvR\nMKrHatmiaqFjaf7nHUaeKafQeGORd4hrfMbuiolDcyLDspAOD6ZCQ4Yg8P1i\nTVMng7kNsuFkM2VEonx+HVcjO0Vm1KcuSrN6VM5zkNbp1CubkLMRkwRewTyv\nxz38k/eOSza4Ou7vo5kyM5uiHBrotHYjqvXS/MLx1YNE7zUTxT9t0VgWVD9D\nC5iKfXQUOh2K+eYkKXwYAG55Wj4lCRcxN4I/R1cl3sWj1uUJfmLO7hpbeivo\nHRPr6zD32+pszK4x65YHF35QdURIKR63/xgBr5bwkKLb3w+UBsjWTnCFbeYF\nCvu8Tc/g49cX3EJM817BomDdxneDmnHqDVtHtHMYgODPMqP9DZdkk/oxePYW\ny82d\r\n=z0J2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBsySvAoMCte8ykw4aM9nc1rOiWVGZ142abBZ4UY9yFyAiB3vT8XDlfRpAgct/E6hPVHz7Xp7r0X+0CA0WGbKlcOww=="}]},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.4.0_1589033551514_0.9102919184576597"},"_hasShrinkwrap":false},"1.4.1":{"name":"jest-react-hooks-shallow","version":"1.4.1","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test:unit":"jest","test:e2e:with-mocking-by-default":"cd samples-and-e2e-tests/with-mocking-by-default && npm i && npm test && cd ../..","test:e2e:without-mocking-by-default":"cd samples-and-e2e-tests/without-mocking-by-default && npm i && npm test && cd ../..","test:e2e":"npm run test:e2e:with-mocking-by-default && npm run test:e2e:without-mocking-by-default &","test":"npm run test:unit && npm run test:e2e","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.4.0","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"b9ce2aba449d847e93a362e9d29d427ccee3d53f","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.4.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-el9oYNAp77WEUgVdBEjPMU+5koOFXfAhitlVShuBine/y2AVCL5nEF9kRDSu9iAo2mMocbwmeTEPyDsw/LAHvg==","shasum":"5a0082c7ef72c0434f55bd7ef4ff8fdbe4e0ab1d","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.4.1.tgz","fileCount":47,"unpackedSize":1265744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJet+OmCRA9TVsSAnZWagAAlccQAJV05ZTWMMR2r53Lw2fa\nQJUlf1AyNpy+0v9fK0fgL8/DPpcQbihs8cPBjbN0SsNxaNiw+55GWvzTxARB\nZMczGkcrep4N1iUC723J42egM5QjWP7KnRl7JVfr8rlKMPcf50wSoH5Zu0FF\nT+HBXktPuWJtuYFG3MUm9l7H3j0L3Pb68tdFh2xlw4946Noy8JmDNgk5M27x\nwNCU45f0NDDaleW1VIRGe7yoxkh7yaFg3mWRVtk42Shyu0ff0uh4nyK9vbB2\nv410Pxiw7XLhieU5Q4M1dUO3zcrYN9/cF5ybUKSRv1mFi9jebt3oCj1BjDBi\nvTyNHZslerBZC83xU/g1O8m39p3Q7d7zMsWJquhTLZA8Z18nUGJ+4B6w+Z4O\nMq9NhTfrqwRLIL73vfTjuLp+egthcn0rz8S6Vc4G6LAHJtr0D6T8EzMi0U3Z\nJgnW/1fozyn7KrGFhtdzedX61A+Ijv/eopcoejhzTJPti6oKcF/nqkVZ5e2g\nWQdY4Spzw8EjlkSglX2Aha15ph21lmO4Dc/xB/0wi29plXC7XVjXEXT8GbMc\nHtbfA0E+ULdOKcJfOnq/LWPEVFFkgzBtX5iWHP48t58Q0y9ybkBt4ipqRw4c\neTiXb9sp90X7KLgv35EuAyV4qgevBOE1E8GeYGZBb6Lg1cuT7V8ytHWS1Y5d\n5bbF\r\n=2bHx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxDNtW4Ih5admc0+IP9Vn49p7+P4bykOX5aJY/PFT9cAIgQqoVqLN9hfOMwh/2rspWzLkS+2pbUw1Lff1Q8AAeMg0="}]},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.4.1_1589109669772_0.41072574750075375"},"_hasShrinkwrap":false},"1.4.2":{"name":"jest-react-hooks-shallow","version":"1.4.2","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test:unit":"jest","test:e2e:with-mocking-by-default":"cd samples-and-e2e-tests/with-mocking-by-default && npm i && npm test && cd ../..","test:e2e:without-mocking-by-default":"cd samples-and-e2e-tests/without-mocking-by-default && npm i && npm test && cd ../..","test:e2e":"npm run test:e2e:with-mocking-by-default && npm run test:e2e:without-mocking-by-default &","test":"npm run test:unit && npm run test:e2e","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.4.0","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"49098e640342cf5fe4295a12160bc204c80d9559","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.4.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Xpn/RjedUEhLpsly1SoNbHYc1RbuG5II1HzrRAXDdRmHmiyOz+28i/VUmDXMRoJooe1ohSKYzkLxhE8E50T6QA==","shasum":"8fd435a9923acb85f5e78eab26782f00d9fb7e80","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.4.2.tgz","fileCount":62,"unpackedSize":1939848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuTwiCRA9TVsSAnZWagAANXEQAJgQpkjaKhowgDRx9fNV\n6lrBKk0EH7xIDXrS26TILiSSkXvh3fTS+60XH/fcQM5Wt1zYePP2yBW6fLsp\nXCAam3qhumxwUHn8UOAAKTuj9pS24QRXdpEZLwtkRaBc1zb9nM6LQ0h6VYlC\nj5tER6L8uTD5FGlKyPA6Uy8pbXd6W9EfLgtMc17C8m9Uozd86QklwxhnUKso\nfEYMOwpdeLFc6ubj0Le1bG9z8yA/8o3XcYskPUyEjFmDV9BAcQ5OdQkC9uqt\nXdA4MHv6anjH6n6l3JW9ZAQifxv9qasejCM8Z50YVMpN6pNqR84wOBIpNzip\nqbLfDukEGK4SUXqLx92lA0PqXET8CMmQVYeBD9xHokeL9O+C8bzwXA9VSNBr\nKVJ11uUFZnJFMbAiHsbVwW8oQrmSK4qFz4P2EEKMvEhBSrvvJ7EPoreMixzH\niLUGiIFRlj+Wwbuf54uKkDdIew6AHqsxkqvInnfC07FrdLUi6wqgn/s6maZ7\n3fSIxWzWdbV9ZSuaKhTntBB8TukP3fWi1D11cZY2DZxId+kjmO+UIBG0ATDc\nmSDVujbZUthAgVYFqIHCo6q9Tgz2ZCN1j6H4hIJqT0QmBPgojhYQa/14rqdI\nyTeNy85y7pPoELrdcqXlg9brAH3jfVUStZ+oBYbkhsyhcEN6IpTxUafLmdPm\nwy8F\r\n=oZ7Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBi62rFVhxGy2pOOLg5RuNnTLfS5pDrSSqO5zwYgELIEAiEA/3gv/N9jHzLc3rgRsQp+PXuUejEHyGEQAV7Q7ZZoL0o="}]},"_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"directories":{},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.4.2_1605975073999_0.19179857022482283"},"_hasShrinkwrap":false},"1.5.0":{"name":"jest-react-hooks-shallow","version":"1.5.0","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test:unit":"jest","test:e2e:with-mocking-by-default":"cd samples-and-e2e-tests/with-mocking-by-default && npm i && npm test && cd ../..","test:e2e:without-mocking-by-default":"cd samples-and-e2e-tests/without-mocking-by-default && npm i && npm test && cd ../..","test:e2e:cra-with-mocking-by-default":"cd samples-and-e2e-tests/cra-with-mocking-by-default && npm i && npm test && cd ../..","test:e2e:cra-without-mocking-by-default":"cd samples-and-e2e-tests/cra-without-mocking-by-default && npm i && npm test && cd ../..","test:e2e":"npm run test:e2e:with-mocking-by-default && npm run test:e2e:with-mocking-by-default && npm run test:e2e:without-mocking-by-default","test":"npm run test:unit && npm run test:e2e","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.4.0","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"42d13ef5d546a89b1e315128353dc82d688052f9","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.5.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-+kB4tPR7V/ld4mK65wK2Bx2/lv2xfYpHLG8gby3hwNfpvIej+jhLXBfT8yTIE6XNlO42P+WpE96KjI91cWpVpg==","shasum":"da85e7fda2e6d8a396f00e7808e7a3ba667c057d","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.5.0.tgz","fileCount":80,"unpackedSize":2976497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNUBECRA9TVsSAnZWagAAflYQAIGJRgbZka3SEx6m+ImL\nwIzbFOJ3rCcWp0KX5zqCi5YFnVlUb3AtbmF0Z+C8NOdo74SOYLjQLtL8edAE\nq9u6ZE7JxrhYataU205RydOn9xrxO+9cW5u0Me70265IMaJvgAxokYKzL4gR\nKKBl0l12iYtt3KicH7OQs0em0YK6gQ1Sr/2NdjU2JX9UFbG0D60tfJhQX4Jr\nsgqJaWcZZ0YP7o3E1RISp2T5l84ld28faTS0+WC/hoQEgmZHo0L6/lSI1lVu\n8yafoH/bXKdt+R51TTHVaASjKk9yeBmqMgaW2bSWtnSIR6AysKbZzmwwm1IJ\nW07NtYBuUxS3aL9sowCzJQSnOWFstE/k7ar8HRXFKMrrEEh9Zi9xI6EdZQX+\nO9qbxSbz0zhhdev50/8FBSq500AyMFJynI9w4hMcKzOYWNYwXMAbvrK+BKnG\nCFZnuJLrwxI8Vx1GTBvjaRaN/WttoyzkyYEiq/dkfa9zIvYZheer1z7kpFHr\nQIeg1qyCTlu2amQBsWKI11Hhx20wyPFD7LoPZKx2DrLcwlHCazp9H9r1lGie\nUHHOrGkel7LKXJgBTEpxCf8Y6q0bSzB1nmbTHtTfQPR6eKK7TiAo1m03eK1f\nd/0PB/unjJ6rZEXRboOVfEBcsodzsp0pzbxG5c9gr5Zlu4GqyUfdU7JlYt0w\nX3rM\r\n=E0Kl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCWHwQYlXWCczDV3WsU7KK3/om5xMOD/LVBLT5f0rvfAIhANIq6Q7ybTp+d08Q/wxWIGtS+CvQzr/35m+d/z/jMbXP"}]},"_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"directories":{},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.5.0_1614102595836_0.41926031164941957"},"_hasShrinkwrap":false},"1.5.1":{"name":"jest-react-hooks-shallow","version":"1.5.1","description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"main":"lib/enable-hooks.js","scripts":{"build":"tsc","test:unit":"jest","test:e2e:with-mocking-by-default":"cd samples-and-e2e-tests/with-mocking-by-default && npm i && npm test && cd ../..","test:e2e:without-mocking-by-default":"cd samples-and-e2e-tests/without-mocking-by-default && npm i && npm test && cd ../..","test:e2e:cra-with-mocking-by-default":"cd samples-and-e2e-tests/cra-with-mocking-by-default && npm i && npm test && cd ../..","test:e2e:cra-without-mocking-by-default":"cd samples-and-e2e-tests/cra-without-mocking-by-default && npm i && npm test && cd ../..","test:e2e":"npm run test:e2e:with-mocking-by-default && npm run test:e2e:with-mocking-by-default && npm run test:e2e:without-mocking-by-default","test":"npm run test:unit && npm run test:e2e","lint":"eslint ./src/**/*.ts"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"license":"ISC","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"devDependencies":{"@types/jest":"^25.1.3","@typescript-eslint/eslint-plugin":"^2.22.0","@typescript-eslint/parser":"^2.22.0","eslint":"^6.8.0","jest":"^25.1.0","ts-jest":"^25.4.0","typescript":"^3.8.3"},"dependencies":{"react":"^16.8.0"},"gitHead":"42d13ef5d546a89b1e315128353dc82d688052f9","bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"_id":"jest-react-hooks-shallow@1.5.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-tyIUh2aKLTGPxbc6aK54pymvvRlX8eGNn3GzXefXAX5BkUwj4geS1pPJijmYeCELbn8+BUP9uS9+6OG5ElVI5Q==","shasum":"d522381061bb9dff5671f84b053d0b3f1cbe37f9","tarball":"https://registry.npmjs.org/jest-react-hooks-shallow/-/jest-react-hooks-shallow-1.5.1.tgz","fileCount":12,"unpackedSize":19100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNUEUCRA9TVsSAnZWagAAlb0P/ijcU36w7PO3HDypcKle\nylVbTgw6RRKkTlB4c0r31WyOHRSRBjAwJml3xM3aPOL3kj2xheSFqSyknaph\nx7sKaW108S7ILlm5KUtXYisBQwvNz9HrxpcJnhIBzA8j3wfssfroVzUAF8pl\niQWoNfSDifbnWp+/fvCaSVeODsl0uE5K5KqIXAiHrr5pQelvNLsKJe40U0J8\nrgjp1bWgxNI7yIPcRy0GTEfVvwIrqG9SLSL2iURaMZ/5BAjxhpOklmjaM+8B\nThfI5NP47eIHyhIVTYstnWLcmRb6Nohk65LYd4W60xBVq3Xer1f5d8S9ZXqP\nrjUni6ULt0typatxw7s7TL6wdFwsnAOS2vNE68stWI7uGn0HYb00ymN3rn41\n6CxZTiBTCiLPnlK/o60uUWPsJdn2Y5IVDGTwoHTQFjMaCfpZKl0+qEGkxZ/r\n7QdbnD01jiT2uAKnSZg0z0dv80LfGWJPLAE9qoeLpPRFCl9vQSc6oRKwEE+p\nz7n3Vtn4bw7BjY2w3Y8jOHcRknNMZa9UUgI5clHuexsCMxKCHfwwyjuenV52\nE1gwS0N76tlRt6tyJ2xcPb4loXy1dsmHiXikjmHIAuj6w9DyJO/CHj5TejMq\nPfQe0IdJfTP+DTAz+cTv4Yd7pxgTJ9yDvLwdwpZHqR+9rM/b5tTa3OxRi2X0\ncFId\r\n=sxKO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3t9K/dh86DtCVNX/rZB/S/FdmtkS3T7DSqPjCRqZQNgIgHG7B94DChUzVmrifFmSoME6OJdO6m3OD7jwCgcyeqb8="}]},"_npmUser":{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"},"directories":{},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-react-hooks-shallow_1.5.1_1614102804292_0.5784558734184304"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-05T23:42:50.665Z","1.0.0":"2020-03-05T23:42:50.771Z","modified":"2022-05-06T12:40:19.022Z","1.1.0":"2020-03-07T11:56:22.693Z","1.2.0":"2020-03-10T23:54:49.220Z","1.3.0":"2020-05-03T16:41:41.132Z","1.4.0":"2020-05-09T14:12:31.702Z","1.4.1":"2020-05-10T11:21:09.916Z","1.4.2":"2020-11-21T16:11:14.179Z","1.5.0":"2021-02-23T17:49:56.011Z","1.5.1":"2021-02-23T17:53:24.476Z"},"maintainers":[{"name":"mikeborozdin","email":"mike.borozdin@gmail.com"}],"description":"React Hooks for shallow rendering","homepage":"https://github.com/mikeborozdin/jest-react-hooks-shallow","keywords":["react","hooks","react hooks","shallow","testing","enzyme","mock","jest"],"repository":{"type":"git","url":"git+https://github.com/mikeborozdin/jest-react-hooks-shallow.git"},"author":{"name":"Mike Borozdin","email":"mike.borozdin@gmail.com"},"bugs":{"url":"https://github.com/mikeborozdin/jest-react-hooks-shallow/issues"},"license":"ISC","readme":"jest-react-hooks-shallow\n====\nShort Story\n====\n\nThis package makes React Hooks (namely, `useEffect()` and `useLayoutEffect()`) work with shallow rendering. In other words, you can use enzyme. Yay! \n\nInstallation\n====\n\nJust install this package with\n\n```\nnpm install --save-dev jest-react-hooks-shallow\n# or\nyarn add --dev jest-react-hooks-shallow\n```\n\n and add these lines to your Jest setup file (specified by `setupFilesAfterEnv`):\n\n```js \nimport enableHooks from 'jest-react-hooks-shallow';\n\n// pass an instance of jest to `enableHooks()`\nenableHooks(jest);\n```\n\nAnd voilà - `useEffect()` and `useLayoutEffect()` will work with shallow rendering. From this moment on your test don't need to know anything about `useEffect()`. After all, it's a mere implementation detail.\n\nIf you have a lot tests relying on `mount()`, please check [Usage with `mount()` section](#usage-with-mount).\n\nTesting\n====\n\nSo if you have a component like this:\n\n```js\nconst ComponentWithHooks = () => {\n  const [text, setText] = useState<>();\n  const [buttonClicked, setButtonClicked] = useState<boolean>(false);\n\n  useEffect(() => setText(\n    `Button clicked: ${buttonClicked.toString()}`), \n    [buttonClicked]\n  );\n\n  return (\n    <div>\n      <div>{text}</div>\n      <button onClick={() => setButtonClicked(true)}>Click me</button>\n    </div>\n  );\n};\n```\n\nYou can easily test it with code like this:\n\n```js\ntest('Renders default message and updates it on clicking a button', () => {\n  const component = shallow(<App />);\n\n  expect(component.text()).toContain('Button clicked: false');\n\n  component.find('button').simulate('click');\n\n  expect(component.text()).toContain('Button clicked: true');\n});\n```\n\nPlease note, that those tests didn't have to import anything else. They simply don't know that a component calls `useEffect()`. Yet, it's being called when you invoke `shallow()`.\n\nThat said, often you want to test that a specific function has been called on some event. For example, you're calling a Redux action creator or a Mobx action. If you're using React Hooks, chances are you'll pass that function as a callback to `useEffect()`.\n\nNo problems! You can easily test it with simple Jest mocks.\n\nSay, we have a component like this:\n\n```js\nimport someAction from './some-action';\n\nconst ComponentWithHooks = () => {\n  const [text, setText] = useState<>();\n  const [buttonClicked, setButtonClicked] = useState<boolean>(false);\n\n  useEffect(someAction, [buttonClicked]);\n\n  return (\n    <div>\n      <div>{text}</div>\n      <button onClick={() => setButtonClicked(true)}>Click me</button>\n    </div>\n  );\n};\n```\n\n```js\ntest('Calls `myAction()` on the first render and on clicking the button`', () => {\n  const component = shallow(<App />);\n  expect(callback).toHaveBeenCalledTimes(1);\n\n  component.find('button').simulate('click');\n  expect(callback).toHaveBeenCalledTimes(2);\n});\n```\n\nUsage with `mount()`\n====\n\nThere have been a reported problems about using the library on tests that rely on `mount()`.\n\nYou don't need this library to trigger `useEffect()` and `useLayoutEffect()` when doing full rendering with `mount()`. However, you may have a mix of tests that rely both rely on `shallow()` and `mount()`. In those cases, you may run into issues with the tests that call `mount()`.\n\nVersion `1.4.0` of this library provides two solutions for that:\n\n* Initialise the library with `enableHooks(jest, { dontMockByDefault: true })` and wrap tests for hook components relying on `shallow()` with `withHooks()`\n  * That's useful when you have a lot of tests with `mount()`\n* Wrap `mount()`-based tests for hooks components with `withoutHooks()`.\n\nOption #1 - `{ dontMockByDefault: true }`\n----\n\nThat will disable effect hooks mocks by default. And you can wrap tests with that rely on `shallow()` and hooks with `withHooks()`, e.g.:\n\n**setupJest.js**\n```js \nimport enableHooks from 'jest-react-hooks-shallow';\n\n// pass an instance of jest to `enableHooks()`\nenableHooks(jest, { dontMockByDefault: true });\n```\n\n**App.test.js**\n```js\nimport { withHooks } from 'jest-react-hooks-shallow';\n\ntest('Shallow rendering of component with hooks', () => {\n  withHooks(() => {\n\n    const component = shallow(<App />);\n    // your test code\n  });\n});\n```\n\nOption #2 - `withoutHook()`\n----\n\nOr you can enable hooks in shallow by default and surround tests using `mount()` with `withoutHooks()`, e.g.:\n\n ```js\n  import { withoutHooks } from 'jest-react-hooks-shallow';\n\n  test('Full rendering of component with hooks', () => {\n    withoutHooks(() => {\n\n      const component = mount(<App />);\n      // your test code\n    });\n  });\n  ```\n\n`disableHooks()` and `reenableHooks()` are now deprecated\n----\n\n`disableHooks()` and `reenableHooks()` from version `1.3.0` are now marked deprecated. You can still use them, but it's not recommended.`.\n\n\nExamples\n----\nPlease, see two samples projects in the [samples-and-e2e-tests](samples-and-e2e-tests/) as an example.\n\nHow does that work?\n----\nYou enable `useEffect()`/`useLayoutEffect()` by calling `enableHooks()` in a file specified by `setupFilesAfterEnv` in the Jest configuration. The code in that code will be called before each test suite. \n\nSo if in our test suite you call `disableHooks()` it will not affect the other ones. But it will disable hooks in shallow rendering for the tests that come after the one with `disableHooks()`. So if any the tests defined after need shallow rendering and hooks, just call `reenableHooks()`.\n\nDependencies\n====\n\nThis library expects that you use Jest as a testing library. \n\nFrankly speaking, you don't have to use enzyme, as it's not the only library which providers shallow rendering. In fact, it doesn't even implement shadow rendering. See the Long Story for details.\n\nHooks Support Status\n====\n|Hook|Support|\n|-----|------|\n|`useEffect`|✅|\n|`useLayoutEffect`|✅|\n|`useImperativeHandle`|Coming soon|\n|`useDebugValue`|No support plans|\n\nAll other hooks (e.g. `useState()`, `useReducer()`) already work with shallow rendering.\n\nFAQ\n===\nQ: Does it call cleanup functions?\n\nA: Yes, it does, but only before calling the same effect again. It won't call cleanup functions when component gets unmounted. That's because, unfortunately, this library doesn't have access to the component life cycle. \n\n\nLong Story\n====\n\nContext\n----\n\nIn case, you wonder why I have created this package instead of extending enzyme, here's a slightly longer story.\n\nActually, it's not enzyme's per se fault that `useEffect()` doesn't work in shallow rendering. It relies on `react-test-renderer` for some aspects of shallow rendering. And it is `react-test-renderer` that implements certain hooks, like `useState()` and does not implement the other ones (e.g. `useEffect()`).\n\nNow, `react-test-renderer` is part of the React library. And there is a [PR](https://github.com/facebook/react/pull/16168) that brings `useEffect()` to shallow rendering. However, that PR has been closed by Facebook. \n\nAccording to the comments on the same PR, there are plans to spin off `react-test-renderer` as a separate package. And indeed, the `master` branch of React does have it as an NPM dependency. However, all currently released versions of React have `react-test-renderer` built-in.\n\nOnce it's a standalone package, I believe it'll be easier to merge the said PR and the need for this library will go away.\n\nHow this Library is Implemented\n----\n\nIf someone wonders how this library is implemented, then we just provide a naïve implementation of `useEffect()`. After all, it's just a function that takes two arguments and executes the first one, if the values of the second argument change (or the function is called for the first time with them or the second argument is undefined).\n\nOkay, the actual implementation of React does have knowledge on whether it's the first render or the second. \n\nWe don't, so we have to rely on mapping callback functions to a list of dependencies (the second argument). If `useEffect()` is called with the same function, but with different dependency values, we will execute that function.\n","readmeFilename":"README.md"}