{"name":"espower-typescript","description":"power-assert instrumentor for TypeScript","version":"9.0.2","author":{"name":"Teppei Sato","email":"teppeis@gmail.com"},"engines":{"node":">=6"},"main":"index.js","scripts":{"demo":"mocha --require './guess' test/demo.ts","lint":"eslint *.js","test":"run-s lint test:*","test:allow-js":"cd test/test-allow-js && mocha --require ../../guess test/*_test.js","test:outdir":"cd test/test-outdir && mocha --require ../../guess test/*_test.ts","test:ts":"mocha --require './guess' test/*_test.ts","test:tsx":"mocha --require './guess' test/*_test.tsx"},"dependencies":{"espower-source":"^2.3.0","minimatch":"^3.0.3","source-map-support":"^0.5.9","ts-node":"^8.0.3"},"devDependencies":{"@types/mocha":"^5.2.5","@types/node":"^6.14.0","@types/react":"^16.4.13","eslint":"^5.15.3","eslint-config-teppeis":"^9.5.0","mocha":"^6.0.2","npm-run-all":"^4.1.3","power-assert":"^1.6.1","prettier":"^1.16.4","react":"^16.5.0","typescript":"^3.1.4"},"peerDependencies":{"typescript":">= 2.4.2"},"homepage":"https://github.com/power-assert-js/espower-typescript","repository":{"type":"git","url":"git+https://github.com/power-assert-js/espower-typescript.git"},"bugs":{"url":"https://github.com/power-assert-js/espower-typescript/issues"},"keywords":["power-assert","typescript"],"license":"MIT","gitHead":"0f44560a60f8715c8920610828e4e401a42c4c85","_id":"espower-typescript@9.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"teppeis","email":"teppeis@gmail.com"},"dist":{"integrity":"sha512-d8A0Sz67iOHhsMw3Qk1Jwr/G4ZNSm+o0anl+/rQ2SxfnvL3+Y6vSzPUnSgT++OR9zGlHFG9f7a3jmJO/UIr3HA==","shasum":"43148b49d94147d477e54c6a7f7ae2ace086d893","tarball":"http://registry-npm.ywwl.com/espower-typescript/download/espower-typescript-9.0.2.tgz","fileCount":4,"unpackedSize":7556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckPEmCRA9TVsSAnZWagAAVR8QAJvVq1N+xMJ1UZTZo2YA\n4yLuBCiEeVWOkNJZBdPfgYHaq7yF2C1hHIsEXPsNW47rEjw89LSRzTPR/uOL\numxAxQjhX6B9lBsQcuOuPfXR7jCG/XNjYK6I7q56eD3RGbz6BChbBXf+XYJ/\nvxV6kJu1UigmyH17AQM71xbKuSTO/12Sv5F9Itj0kRcIRWGG5zVbXbXgCaWd\nVJXmnOFMq1bZ5q4RsAGV30yqUdSYXtEkaya0jDivffuUcYy/bDaPI5qKWVKD\n6RYl6f/OTHDJRSruJBdRbFzXW1ajaFIxsLLClJ2VrtJXgIjFPHGeuQtwc2kG\n8SAWgTUbbSOM6cdpoKBvioUs5sSLYH3rjSMpC45+QM6o10Ymt9uB0VUlkD4A\nmsG4h1EfniSARTmkg+JJpNpnLz70YiSM3BtqeJAa/8YgixIXtmeRMczlfmyq\n39bkwMDbTQIgQ2OHqDmKFIGsiaMwWd5jyQm5FbayRRULUU7msANzda8h7z/t\npFxXPNssR5/rA/O2/D6LwwvNcTdgoqw/UMfuKLRb0ePNHPKTEZnJdNdFhhpM\nHf2syEgHrZdujliPA18KBW7g6ddMAZDfiEi83GghBZPy6yToSMMG7E3REeiL\nsRQROFWEyLNkh44W63nQy1n73SDpOo773Vu/JnMZ70cBeTDAvKCGlrGoBwEk\nQ+jv\r\n=+dhB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsElIO7vMxyJoU0f6vZiEE4fAZTjAowGlsViH0vCTAugIgGwH723IHqAmgLXbr8/3h4ocoTOp92nygfWyQUmRSFg8="}],"size":2884,"noattachment":false,"key":"/espower-typescript/-/espower-typescript-9.0.2.tgz"},"maintainers":[{"name":"teppeis","email":"teppeis@gmail.com"},{"name":"twada","email":"takuto.wada@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/espower-typescript_9.0.2_1553002789551_0.8200074692541843"},"_hasShrinkwrap":false,"readme":"# espower-typescript\n\n> power-assert instrumentor for TypeScript\n\n[![npm version][npm-image]][npm-url]\n![Node.js Version Support][node-version]\n![TypeScript Version Support][ts-version]\n[![build status][ci-image]][ci-url]\n[![Dependency Status][deps-image]][deps-url]\n![monthly downloads][npm-downloads-image]\n![License][license]\n\n## TypeScript versions\n\nespower-typescript v10.x is compatible with TypeScript v2.7+\n\n## Usage (zero-config mode)\n\nInstall\n\n```console\n$ npm install -D espower-typescript power-assert mocha typescript @types/node @types/mocha\n```\n\nCreate a test file (intensionally failed)\n\n```typescript\n// test/test.ts\nimport assert = require('assert');\n\ndescribe('Array#join', () => {\n  it('joins all elements into a string with separator', () => {\n    assert(['a', 'b', 'c'].join(':') === 'a:b:c:');\n  });\n});\n```\n\nRun test\n\n```console\n$ ./node_modules/.bin/mocha --require espower-typescript/guess \"test/**/*.ts\"\n```\n\nOutput\n\n```\n  1) Array#join\n       joins all elements into a string with separator:\n\n      AssertionError [ERR_ASSERTION]:   # test.ts:6\n\n  assert(['a','b','c'].join(':') === 'a:b:c:')\n         |             |         |\n         [\"a\",\"b\",\"c\"] \"a:b:c\"   false\n```\n\n### CAUTION: don't use `import assert from 'assert'`\n\nJust use old style `import assert = require('assert')` for assert module.\nThis is limitation.\n\n## Configure\n\n### If your tests are not in `test` directory\n\nYou can set test directory in your `package.json`\n\n```json\n{\n    \"name\": \"your-module\",\n    \"description\": \"Your module\",\n    \"version\": \"0.0.1\",\n    \"directories\": {\n        \"test\": \"spec/\"\n    },\n...\n}\n```\n\nThen, run mocha with `--require espower-typescript/guess`\n\n```console\n$ ./node_modules/.bin/mocha --require espower-typescript/guess \"spec/**/*.ts\"\n```\n\nNote: `'espower-typescript/guess'` is inspired by [intelli-espower-loader](https://github.com/azu/intelli-espower-loader)\n\n### ts-node and `tsconfig.json`\n\nespower-typescript uses [ts-node](https://github.com/TypeStrong/ts-node) internally.\nIt loads your [tsconfig.json](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json) automatically.\n\n### Disable type check (transpile only)\n\nUse `TS_NODE_TRANSPILE_ONLY` env of ts-node\n\n```console\n$ TS_NODE_TRANSPILE_ONLY=1 ./node_modules/.bin/mocha --require espower-typescript/guess \"test/**/*.ts\"\n```\n\n### JSX/React\n\n`.tsx` files are supported.\n\n### `allowJs`\n\nIf `allowJs: true` in your `tsconfig.json`, assertions in `test/**/*.(js|jsx)` are empowered.\n\n## License\n\n- MIT License: Teppei Sato &lt;teppeis@gmail.com&gt;\n- Includes [yosuke-furukawa/espower-traceur](https://github.com/yosuke-furukawa/espower-traceur)\n- Includes [azu/espower-babel](https://github.com/azu/espower-babel)\n\n[npm-image]: https://badgen.net/npm/v/espower-typescript?icon=npm&label=\n[npm-url]: https://npmjs.org/package/espower-typescript\n[npm-downloads-image]: https://badgen.net/npm/dm/espower-typescript\n[ci-image]: https://github.com/power-assert-js/espower-typescript/workflows/Node.js%20CI/badge.svg\n[ci-url]: https://github.com/power-assert-js/espower-typescript/actions?query=workflow%3A%22Node.js+CI%22\n[deps-image]: https://badgen.net/david/dep/power-assert-js/espower-typescript\n[deps-url]: https://david-dm.org/power-assert-js/espower-typescript\n[node-version]: https://badgen.net/npm/node/espower-typescript\n[ts-version]: https://badgen.net/badge/typescript/%3E=2.7?icon=typescript\n[license]: https://badgen.net/npm/license/espower-typescript\n","publish_time":1553002789670,"_cnpm_publish_time":1553002789670,"dist-tags":{"latest":"10.0.1","next":"9.0.0-beta.0"}}