{"versions":{"1.0.0":{"name":"enzyme-wait","version":"1.0.0","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"95f9c53d6800fe092efc598a320479f33d4d974d","_id":"enzyme-wait@1.0.0","_shasum":"43136340a62136634b09c11179222c2ed6b4feac","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"43136340a62136634b09c11179222c2ed6b4feac","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.0.tgz","size":2391,"integrity":"sha512-MO5c58jz9Z+PJbB9tB/6uI44wt6LNIu4Sr0oyirhNcrI6et9CJ7i5ESaNITGYvorbSkF5B9MdHTM9zqGzq0k8g=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.0.tgz_1485700609264_0.68339973106049"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:27.001Z","contributors":[]},"1.0.1":{"name":"enzyme-wait","version":"1.0.1","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"4de6afe998b1869926e0a4418e976cf2ea214f39","_id":"enzyme-wait@1.0.1","_shasum":"b79d93094471acd5ef81c453459c325298f4b35a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"b79d93094471acd5ef81c453459c325298f4b35a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.1.tgz","size":2401,"integrity":"sha512-l+zudLwaItsw1OMjzP3Mpy6Z45b6kbQvYLyvr3KHTydZuE/vWjog32/YPbdJxk4p0AEtXwmt/xfkxcQ7GiJ+Pg=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.1.tgz_1485700963343_0.7878909229766577"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:27.870Z","contributors":[]},"1.0.2":{"name":"enzyme-wait","version":"1.0.2","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"94893b90b5379338eb3c885fdb731f58c3f5d3a4","_id":"enzyme-wait@1.0.2","_shasum":"5b90a0d170f023b36f5108f12b8c4b23889f0013","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"5b90a0d170f023b36f5108f12b8c4b23889f0013","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.2.tgz","size":2398,"integrity":"sha512-QT1hqqMhGOK9qQ0d6yO++BfcyzLssb00lBQ/MFE3ksO5dJbXxv6LTlxMWh+AOcSJ3AoMZyEO7I697IrdJgyxjg=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.2.tgz_1485701309117_0.6402468329761177"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:28.734Z","contributors":[]},"1.0.3":{"name":"enzyme-wait","version":"1.0.3","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"c250f46638c8a60d82e3d7ce8bb759dbf4b6162b","_id":"enzyme-wait@1.0.3","_shasum":"e2a15a1fbc23b66a1fc727fe98eb3c0717589c80","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"e2a15a1fbc23b66a1fc727fe98eb3c0717589c80","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.3.tgz","size":2393,"integrity":"sha512-y0eu7jkjMM+av1lmJ2L3Zj4qSveTsQkv7zDVj/pXdqNFcQHdpif3cOBfgQ8gbdg/Af0wr+IbAjnWBV3Px/PUhw=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.3.tgz_1485701510736_0.49693384510464966"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:29.601Z","contributors":[]},"1.0.4":{"name":"enzyme-wait","version":"1.0.4","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"589fdae7f893e89f29d09a77fea78ddbd8c6db86","_id":"enzyme-wait@1.0.4","_shasum":"ab092154d407dd29917529a134ddb21c77067eeb","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"ab092154d407dd29917529a134ddb21c77067eeb","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.4.tgz","size":1794,"integrity":"sha512-Eu2nQu/s/SaLWj/uzEIM8B8aMrDQB4a0rUSX/Wxe7flzgPVopLUDO+c7RRCUOp9sFkzZx/VMQKVU1Q5jPNHV8w=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.4.tgz_1485764242473_0.3541659964248538"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:30.475Z","contributors":[]},"1.0.5":{"name":"enzyme-wait","version":"1.0.5","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"keywords":["enzyme","waiting","promise","waitForElement","react","mount","testing","integration testing"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"8d9370391686708038294c0144b4bae08862043b","_id":"enzyme-wait@1.0.5","_shasum":"ff6b1ba1d3b2063f1d3ed85a100d1d7265223f99","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"ff6b1ba1d3b2063f1d3ed85a100d1d7265223f99","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.5.tgz","size":2435,"integrity":"sha512-3l5TUduqyV9nlkQz9zCbvLNqte+Sv/tpuBK6X+xHohZ81q7NFz+8C2ERBo3CDH4PL1naiq+B3pNTS/UdSxsYsA=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.5.tgz_1485766967594_0.6657235408201814"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:31.342Z","contributors":[]},"1.0.6":{"name":"enzyme-wait","version":"1.0.6","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"keywords":["enzyme","waiting","promise","waitForElement","react","mount","testing","integration testing"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"66e24170874be9bb0052df322781ba0aa4cb322a","_id":"enzyme-wait@1.0.6","_shasum":"8d99a394e8be4fee2dd31f8c9bbdde302d239b06","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"8d99a394e8be4fee2dd31f8c9bbdde302d239b06","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.6.tgz","size":2439,"integrity":"sha512-ogdhti4NFqVQn8on742It6KELToVFLSeH2/6FlCyUeZL9aFZf1FNOTs2p9IRNEUyx1i29E0RdjxBUVdh9HsTmQ=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.6.tgz_1485784614282_0.9231204483658075"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:31.647Z","contributors":[]},"1.0.7":{"name":"enzyme-wait","version":"1.0.7","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"keywords":["enzyme","waiting","promise","waitForElement","react","mount","testing","integration testing"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"66e24170874be9bb0052df322781ba0aa4cb322a","_id":"enzyme-wait@1.0.7","_shasum":"231035b6121f41758e5537b0c5b340f70f426b1e","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"231035b6121f41758e5537b0c5b340f70f426b1e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.7.tgz","size":2428,"integrity":"sha512-DMynRBz8dTeGI2Luk8phJImy9PdhC4M1r50sBzlFHF3NtiB7NNZdCVM5wCIuqafR1QUEbDoosq+VpTlgYhzpkw=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.7.tgz_1490383744087_0.15316361654549837"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:32.518Z","contributors":[]},"1.0.8":{"name":"enzyme-wait","version":"1.0.8","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"keywords":["enzyme","waiting","promise","waitForElement","react","mount","testing","integration testing"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"8c2ed574a0053600649e319ef3806d903b0fc1fb","_id":"enzyme-wait@1.0.8","_shasum":"97d0056fb504811809ee73ad766a4427632f1448","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"97d0056fb504811809ee73ad766a4427632f1448","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.8.tgz","size":2862,"integrity":"sha512-xvG/evKCl+iNKRym6Dt69xRhLSjvzgiD13RUqXJO1TsE+73LkeR0SpRwAGRA14btIp+shb3hnyqCvYr94fbjKg=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.8.tgz_1490383826146_0.9039946228731424"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:33.428Z","contributors":[]},"1.0.9":{"name":"enzyme-wait","version":"1.0.9","description":"Wait for an async element to appear when performing integration tests with enzyme.","main":"lib/index.js","scripts":{"dist":"babel ./src/ --out-dir lib --ignore .spec.js","test":"jest"},"author":"","license":"MIT","devDependencies":{"babel-cli":"^6.22.2","babel-preset-node5":"^12.0.0","jest":"^18.1.0"},"dependencies":{"assertion-error":"^1.0.2"},"files":["lib"],"keywords":["enzyme","waiting","promise","waitForElement","react","mount","testing","integration testing"],"repository":{"type":"git","url":"git+https://github.com/etiennedi/enzyme-wait.git"},"bugs":{"url":"https://github.com/etiennedi/enzyme-wait/issues"},"homepage":"https://github.com/etiennedi/enzyme-wait#readme","gitHead":"e9f9e3c1e9866e5767963280cd2338b1839681a9","_id":"enzyme-wait@1.0.9","_shasum":"f7a08bf49c7047358fa03e1f411a565c3a15101a","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.4","_npmUser":{"name":"anonymous","email":"etienne@dilocker.de"},"dist":{"shasum":"f7a08bf49c7047358fa03e1f411a565c3a15101a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/enzyme-wait/-/enzyme-wait-1.0.9.tgz","size":2862,"integrity":"sha512-NnEmb5p8YwdybuuNNmYzTVVAUtvy+wrhaYaTFAtoOl4ghiE0RL1PW0CqdoU2g9MiMjoEM0bUXv2onb/AG0/f7w=="},"maintainers":[{"name":"anonymous","email":"etienne@dilocker.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/enzyme-wait-1.0.9.tgz_1490383994129_0.8902709693647921"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T11:35:34.311Z","contributors":[]}},"dist-tags":{"latest":"1.0.9"},"name":"enzyme-wait","time":{"created":"2022-01-26T16:50:14.663Z","modified":"2022-01-26T16:50:14.663Z","1.0.0":"2017-01-29T14:36:49.808Z","1.0.1":"2017-01-29T14:42:45.161Z","1.0.2":"2017-01-29T14:48:29.638Z","1.0.3":"2017-01-29T14:51:51.289Z","1.0.4":"2017-01-30T08:17:23.130Z","1.0.5":"2017-01-30T09:02:48.196Z","1.0.6":"2017-01-30T13:56:54.921Z","1.0.7":"2017-03-24T19:29:06.103Z","1.0.8":"2017-03-24T19:30:28.077Z","1.0.9":"2017-03-24T19:33:16.053Z"},"readme":"# enzyme-wait\nWait for an async element to appear when performing integration tests with enzyme.\nReturns a promise which resolves with the root component you performed your search on.\n\n**NEW**: There is now a [fully working example](#checking-out-the-example-repo) using both Promises and async/await.\n\n## How to use:\n\n`````javascript\ncreateWaitForElement(\n    enzymeSelector,\n    /*Optional*/ timeOut,\n    /*Optional*/ intervalDuration\n)(componentToSearchOn)\n    .then(/* ... */)\n    .catch(/* ... */)\n`````\n\n## Example Usage (Promises):\n\n`````javascript\nimport React from 'react';\nimport { mount } from 'enzyme'\nimport { createWaitForElement } from 'enzyme-wait';\n\n/**\n * The component you want to test. Assume it displays\n * the string \"ready\" after performing some async action\n * which takes time.\n */\nimport SampleComponent from '...';\n\nconst waitForSample = createWaitForElement('#sample-ready');\n\nconst component = mount(<SampleComponent />);\n\nit('displays ready once it is ready', ()=> {\n    waitForSample(component)\n        .then( copmonent => expect(copmonent.text()).to.include('ready') );\n});\n`````\n\n## Example Usage (async/await)\n\nThe same as above but using async/await instead of Promises:\n`````javascript\nit('displays ready once it is ready', async ()=> {\n    const componentReady = await waitForSample(component);\n    expect(copmonentReady.text()).to.include('ready');\n});\n`````\n\n## Chaining promises\n\nIf you have multiple async actions happening, just make sure to always return a Promise which\nresolves with the root component. This way you can create nice looking chains and avoid callback hell.\n\nExample:\n\n`````javascript\nconst component = mount(<SampleComponent />);\n\nit('displays ready after multiple interactions', ()=> {\n    createWaitForElement('#sample-ready')(component)\n        .then( /* do something and return a resolved promise with the comp */ )\n        .then( /* do something and return a resolved promise with the comp */ )\n        .then( createWaitForElement('#another-component-ready') )\n        .then( component => expect(component.text().to.include('ready') );\n});\n\n`````\n\n## Checking out the example repo\n\nThere is now a working example inside this repo using both the Promise-approach as well as the async/await-approach.\n\nThe example uses Jest, but it should work with any test framework. In other frameworks you might need to call done() on asynchronous tests.\n\nTo play around with this example you can:\n\n1. clone this repo\n1. run `npm install && npm run dist` on the root repo (this is required to create a lib version of this package which is listed in the example's dependencies )\n1. go to the example folder `cd example`\n1. in there, run `npm install && npm start`\n1. open your browser at `http://localhost:9000` to see the example or run `npm test` to see the tests working.","users":{}}