{"_id":"@asdgf/testing-helpers","_rev":"3-90b3f666daa48a7303d9bd6bd3c8683c","name":"@asdgf/testing-helpers","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@asdgf/testing-helpers","version":"0.0.1","description":"A stupid simple way to test","type":"module","scripts":{"hanbi":"esbuild src/hanbi/index.js --bundle --minify --format=esm --outfile=hanbi/index.js","uvu":"esbuild src/uvu/index.js --bundle --minify --format=esm --outfile=uvu/assert/index.js","owc":"esbuild src/open-wc/index.js --bundle --minify --format=esm --outfile=open-wc/index.js","owc:timing":"esbuild src/open-wc/timing/index.js --bundle --minify --format=esm --outfile=open-wc/timing/index.js","build":"yarn hanbi && yarn uvu && yarn owc && yarn owc:timing","prepublishOnly":"yarn build"},"repository":{"type":"git","url":"git+https://github.com/thepassle/asdgf.git"},"keywords":["mocha","test","testing","assert","expect"],"author":{},"license":"ISC","bugs":{"url":"https://github.com/thepassle/asdgf/issues"},"homepage":"https://github.com/thepassle/asdgf#readme","contributors":[{"name":"Pascal Schilp","email":"pascalschilp@gmail.com"}],"dependencies":{},"devDependencies":{"@open-wc/testing-helpers":"^1.8.12","hanbi":"^1.0.1","uvu":"^0.5.1"},"_id":"@asdgf/testing-helpers@0.0.1","dist":{"shasum":"3ce4d4e293cf14999aac6b73c4d01825e8334214","integrity":"sha512-pk2UzWF86EqXwouNIr2nMszVDslGIWbLj8x9b5boVqXuvzZN2yN/YmdnNScpXmWy3TDD6n9e288Cf68pYC+48A==","tarball":"https://registry.npmjs.org/@asdgf/testing-helpers/-/testing-helpers-0.0.1.tgz","fileCount":12,"unpackedSize":46798,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICxr/i0YG9FZHfgWKQJZ333JHGI9zz8E7qbLPBJ6O7zVAiEAwHWvimY3QRQY1RKX6iYWskrOpKImDVuSjgso0W1vbDw="}]},"_npmUser":{"name":"passle","email":"pascalschilp@gmail.com"},"directories":{},"maintainers":[{"name":"passle","email":"pascalschilp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/testing-helpers_0.0.1_1633076990253_0.4465812551276547"},"_hasShrinkwrap":false},"0.0.2":{"name":"@asdgf/testing-helpers","version":"0.0.2","description":"A stupid simple way to test","type":"module","scripts":{"hanbi":"esbuild src/hanbi/index.js --bundle --minify --format=esm --outfile=hanbi/index.js","uvu":"esbuild src/uvu/index.js --bundle --minify --format=esm --outfile=uvu/assert/index.js","owc":"esbuild src/open-wc/index.js --bundle --minify --format=esm --outfile=open-wc/index.js","owc:timing":"esbuild src/open-wc/timing/index.js --bundle --minify --format=esm --outfile=open-wc/timing/index.js","build":"yarn hanbi && yarn uvu && yarn owc && yarn owc:timing","prepublishOnly":"yarn build"},"repository":{"type":"git","url":"git+https://github.com/thepassle/asdgf.git"},"keywords":["mocha","test","testing","assert","expect"],"author":{},"license":"ISC","bugs":{"url":"https://github.com/thepassle/asdgf/issues"},"homepage":"https://github.com/thepassle/asdgf#readme","contributors":[{"name":"Pascal Schilp","email":"pascalschilp@gmail.com"}],"dependencies":{},"devDependencies":{"@open-wc/testing-helpers":"^1.8.12","hanbi":"^1.0.1","uvu":"^0.5.1"},"_id":"@asdgf/testing-helpers@0.0.2","dist":{"shasum":"6b5cb36a98d08eb01b90be358106a7b79ec0457e","integrity":"sha512-gYoUyygRlFRUfJc5wv1msImttqtNiz/t+lCVU21pOq+cTVCtvllN/JN+NisnJqceaMbFZeeJjfozGgdtr0BE8w==","tarball":"https://registry.npmjs.org/@asdgf/testing-helpers/-/testing-helpers-0.0.2.tgz","fileCount":12,"unpackedSize":47014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh118nCRA9TVsSAnZWagAAxNYP/jX0IqLxFHxKfHAS0n79\niuUiAWVp1is+bwbrqYqrZZG72jd/z1paVxb7OWfwkEiEx2jD7nZTLGIwj6H1\n2Ed9b6nIPpRpnkzZs5OIjJQ5yDXuzADNAYPeo1gy/arLno7imsYTWvH5Tx8r\nLGHJh1/ijbefZr6Cz6Mbr8unAT/tOnv30iD+v6VSpOalcLQQAbHphVzze/oK\nftmUb9rrhXgfzgkNH9d+BLQa2z9NDnLEvT8kPJ5iUNShSTm2+z0u+6MhjIo5\nWkWwTjVt0he5/V1di6MqmNmJORzAwNUUgCMQtPclLu2KpjWrSfc4fNalEkSF\nVranJ78zJsi/c6BEWrfD0NtTYm7N/aIMAgj6u/vnofLZfrOedmELANSGuKZq\n44ca2I6o3ufEhB4MQD3qut3M4OJRTSAOkAFhzC3LbJyz8+L9h+GJyVYtqKOb\nnOPSj/Upw3RK4hd8s15RSob/vL6ETxhJUm51fVXqfarYanY+Pi3TDsSR4chn\nCDLTcPAZ6QSCpEWtITKsbWbynZ5dfLkP7rzEV7Jy5ebqTd7RnX3zCOvyrtRZ\nhXN6odcUT9Gzc1aWai2sSiFhbQppitBtzvm8aKbC9CeP82vPNTB86HkCsH9q\naQKCz6XdfGxITlrytwLxSJACQj+z0ip1TiGg5TcDeWSK/4GDTkvs7sQoxey2\nX+4r\r\n=RAig\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpUO22p1mkygpVI2SJqwo/b43ORfBZYKcI0z6H84u/+wIgNWE6/6Ayf8FnpFAZQcnqjRNPkaM1VLniKrrf4lzQIDw="}]},"_npmUser":{"name":"passle","email":"pascalschilp@gmail.com"},"directories":{},"maintainers":[{"name":"passle","email":"pascalschilp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/testing-helpers_0.0.2_1633077214232_0.41059395331687476"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-01T08:29:50.099Z","0.0.1":"2021-10-01T08:29:50.393Z","modified":"2022-04-04T15:44:23.420Z","0.0.2":"2021-10-01T08:33:34.391Z"},"maintainers":[{"name":"passle","email":"pascalschilp@gmail.com"}],"description":"A stupid simple way to test","homepage":"https://github.com/thepassle/asdgf#readme","keywords":["mocha","test","testing","assert","expect"],"repository":{"type":"git","url":"git+https://github.com/thepassle/asdgf.git"},"contributors":[{"name":"Pascal Schilp","email":"pascalschilp@gmail.com"}],"author":{},"bugs":{"url":"https://github.com/thepassle/asdgf/issues"},"license":"ISC","readme":"# `@asdgf/testing-helpers`\n\n> A stupid simple way to test\n\nNo magic, no nonsense.\n\nOpinionated package of small, performant, minified, ESM-friendly reexported helper libraries\n\n## ~~Sinon~~ ➡️ [Hanbi](https://www.npmjs.com/package/hanbi)\n\n```js\nimport { spy, stub, stubMethod, restore } from '@asdgf/testing-helpers/hanbi/index.js';\n```\n\n## ~~Chai~~ ➡️ [uvu/assert](https://www.npmjs.com/package/uvu)\n```js\nimport { assert } from '@asdgf/testing-helpers/uvu/assert/index.js';\n```\n\n## [@open-wc/testing-helpers](https://www.npmjs.com/package/@open-wc/testing-helpers) fixture\n```js\nimport { fixture, fixtureCleanup, html } from '@asdgf/testing-helpers/open-wc/index.js';\n```\n\n## [@open-wc/testing-helpers](https://www.npmjs.com/package/@open-wc/testing-helpers) timing\n```js\nimport { waitUntil, nextFrame, aTimeout } from '@asdgf/testing-helpers/open-wc/timing/index.js';\n```\n\n## Example usage\n\n```js\nimport { describe } from '@asdgf/core';\nimport * as hanbi from '@asdgf/testing-helpers/hanbi/index.js';\nimport { assert } from '@asdgf/testing-helpers/uvu/assert/index.js';\nimport { fixture, fixtureCleanup } from '@asdgf/testing-helpers/open-wc/index.js';\n\nclass MyElement extends HTMLElement {\n  getName() {\n    return 'world';\n  }\n  connectedCallback() {\n    this.innerHTML = `<h1>hello ${this.getName()}</h1>`;\n  }\n}\ncustomElements.define('my-element', MyElement);\n\ndescribe('my-element', ({it, afterEach}) => {\n  afterEach(fixtureCleanup);\n\n  it('renders correctly', async () =>{\n    const el = await fixture('<my-element></my-element>');\n    const stub = hanbi.stubMethod(el, 'getName').returns('foo');\n    el.connectedCallback();\n    assert(el.textContent, 'hello foo');\n    stub.restore();\n  });\n});\n```\n","readmeFilename":"README.md"}