{"_id":"@alexp643/stu","_rev":"2-14b353bed1bd25c28adc10050654caf8","name":"@alexp643/stu","dist-tags":{"beta":"4.0.0-beta.0","latest":"4.0.0-beta.0"},"versions":{"4.0.0-beta.0":{"name":"@alexp643/stu","version":"4.0.0-beta.0","description":"Stub dependencies when testing","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"pkg-build","test":"pkg-test","lint":"pkg-lint","tidy":"pkg-tidy"},"repository":{"type":"git","url":"git+https://github.com/stayradiated/stu.git"},"keywords":["mock","automock","inject","require","sinon","test"],"author":{"name":"George Czabania","email":"george@czabania.com"},"license":"MIT","bugs":{"url":"https://github.com/stayradiated/stu/issues"},"homepage":"https://github.com/stayradiated/stu#readme","devDependencies":{"@mishguru/package":"^9.6.0","@types/caller":"^1.0.0","@types/sinon":"^7.5.2"},"dependencies":{"caller":"^1.0.1","sinon":"^7.5.0","unwire":"^6.1.0"},"gitHead":"d69d170e42c75d18a4093f51da51bf67bf5e3aeb","_id":"@alexp643/stu@4.0.0-beta.0","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FusqotrBzoZD/g03JsWnJB5eaUX5V2B8Mw2U2nRxXvmOHgtAxp1rAa+GbC05l9QFaUauRgqmshrWEeRzQX+Q4g==","shasum":"230a2aec37daaebbe8de250ea8b9510bd4d6a431","tarball":"https://registry.npmjs.org/@alexp643/stu/-/stu-4.0.0-beta.0.tgz","fileCount":39,"unpackedSize":580728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxI/5CRA9TVsSAnZWagAA+qYP/j9kIb3xyKA7hNtnN+bP\n+WzZmqWDMjhsDbbD/sV2PHMqNgyDPtftaEJHqJKlDxjPSZ42qRqbQlrCnpgD\npFASmLBBJqYMbB/iFqv4ky1Hp/aSclmOJtbOgXQIhopJ+JE5wS9zpWeS6Yvl\ncm24RwdVAXemk7BhIzl58LjnmI9S5+OQBKrRAL1dylmsTH9SThCiQK2Tq7XC\nIsEgSSTH6FY/u1R6Kr7y8bLoUDwpcdVRXsTqk97EETBrxURJU6i1ebpnW0aw\nKOg32mWdUlkOnTgdYhY6YP8joNxoq+fHKejb9SBwosxrYeQVZnc+oCIaGNGQ\naDH9rNIAxiy1wRZlx0XBtIooAVFR5xyFnacKViacsbQ2W+a2/rcbJ2YxnCD6\na1a2UZyicDmpEnUvkBFiYbXaLzjmhBuKpSV6JWPlHwpEW31rPPsdGd57HCy4\nBp6Br4SDYkUkDFMqcsU3E64v1w0yxoW8PfMRhFWYjhDlS/vvCTw9dl0LbQEt\nMOy+FcrRLkOo/fcMF04XG0XF7dxtPIiALoL6G1M3afxpKxbqUX+3SOhC56oA\nQ6F4FlRc6BeZUA6C/sPXacN+FHlUGeSEJyoOX6qK9ixbmBnuYnjLWvR/3T4C\nImz6DmwWrchuN7WQsHd6BILL2+oa4cDS/C4wQdO0vXTNEaGEuYzw0sSwv56f\ncCY3\r\n=V5b7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5EGjP8TO8SSffE0EbmwE8G7UZfsZ0MthkAaBwunpWQgIgYeLToW04/6NUVoKJeMB8jvEoOpuANnmWLfpswSXlyUU="}]},"_npmUser":{"name":"alexp643","email":"alex@mish.guru"},"directories":{},"maintainers":[{"name":"alexp643","email":"alex@mish.guru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stu_4.0.0-beta.0_1635745293859_0.6069201246778084"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-01T05:41:33.815Z","4.0.0-beta.0":"2021-11-01T05:41:33.978Z","modified":"2022-04-04T12:41:27.168Z"},"maintainers":[{"name":"alexp643","email":"alex@mish.guru"}],"description":"Stub dependencies when testing","homepage":"https://github.com/stayradiated/stu#readme","keywords":["mock","automock","inject","require","sinon","test"],"repository":{"type":"git","url":"git+https://github.com/stayradiated/stu.git"},"author":{"name":"George Czabania","email":"george@czabania.com"},"bugs":{"url":"https://github.com/stayradiated/stu/issues"},"license":"MIT","readme":"# Stu\n\n> A shoddy replacement for jest that works with mocha and sinon but is way\n> faster.\n\nBasically it allows you to stub entire modules that are required by the file\nyou are testing.\n\n## Installation\n\n```\nnpm install --save-dev stu\n```\n\n## Usage\n\n``` javascript\nimport test from 'ava';\nimport * as stu from 'stu';\n\ntest.beforeEach((t) => {\n  t.context = {\n    ...t.context,\n    library: stu.mock('library'),\n    mycode: stu.test('../mycode').default\n  };\n})\n\ntest('should do stuff with thing', (t) => {\n    const { library, mycode } = t.context;\n\n  library.returns('some value');\n  mycode();\n  t.deepEqual(library.args, [['a', 'b', 'c']]);\n});\n```\n","readmeFilename":"README.md"}