{"name":"espower-typescript","description":"power-assert instrumentor for TypeScript","version":"8.1.4","author":{"name":"Teppei Sato","email":"teppeis@gmail.com"},"engines":{"node":">=4"},"main":"index.js","files":["*.js"],"scripts":{"demo":"mocha --require './guess' test/demo.ts","test":"run-s test:*","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","typescript":"^2.2.1","typescript-simple":"^8.0.6"},"devDependencies":{"expect.js":"^0.3.1","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","react":"^16.4.1"},"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":"375311ecbbffca450048b7b1fb0742a095ef8fcd","_id":"espower-typescript@8.1.4","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"teppeis","email":"teppeis@gmail.com"},"dist":{"integrity":"sha512-Zx3pdfgz6ybChtt9SVY/O17v8HF0WRB4AdBLbXl5N3dGRel6EyEinzM4zdmNFcmcPXIz0nkqlIWTqGxqrIWviQ==","shasum":"b36742ab346b331291b1fb15816e815c3edd0fcd","tarball":"http://registry-npm.ywwl.com/espower-typescript/download/espower-typescript-8.1.4.tgz","fileCount":4,"unpackedSize":6845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbL+g1CRA9TVsSAnZWagAAA88P/0B3G5jFbahJlKKWsGGU\n1JIwZiIH4hkxmHTzu3jxgEggATgZz/spf+RgIzOun124mUfDJ1vsP6aG7i1Y\nH+jsE3rnUJQzcSlqSIEIOIRZkgvKi/4UPjp9TCjyiZrFyHvIPxKiCFzneqbX\nl6RYviwdMQ7PUn5UvsNDm+TuU5J0yO7MhfJxcyHPUzYAlvzOw3phaZl6qsNi\n4bplf4w9zBwxUFuI37x3e8OiZdwLsKuVLgaZX1bUfrGaPBDnwZawlq2oqRHs\nY5svWLNpQwv25h/7cyw6lzglo+PAqSbTRSV3PBHBA8B8tXeWtGXUteMWODsx\nY+t2dIIldw6pO5Gw0z0GSL5D/v7GsvnxwahHzU0q/KEH/UEJojmBT9v8ddXt\n63UQ+QKFYTwSGkW+7XLnhTIFrOtx5ebjlT/OdWukItbQC7P2D59nnI5vppB/\ngEJwiLzj+DJFH/RJiCid0Zwgj2n6h+xhVLndLcAvdGMWelELHcN1/VxmaSUj\nUNjyFlFCmqlgUlzGOTlun5KsKGFE/3hK5GVKByeSVi/R8OgWR1BZ1b2wFXQv\nrJSB0hC9BVMBRIprZ6uEvWuQVdusiswKYhlFxTxcVwBWC7kRT/5WQl+jW0Lr\naTT+EhHJ7dVlg1dRGoqN5sKCbKB3mw9ShmWwH41CzqD5RccdavXphnazKkv+\nxiR6\r\n=0DMk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDb2qVvna3OAlQjt00XyN+TbOZQM1uRKRWZcn+1h0tEmwIhAK0HAxVj+Ev7hGvqagfjdiconBOxiAd1Wds7lMsjbxDz"}],"size":2438,"noattachment":false,"key":"/espower-typescript/-/espower-typescript-8.1.4.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_8.1.4_1529866293409_0.5120410644729787"},"_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":1529866293951,"_cnpm_publish_time":1529866293951,"dist-tags":{"latest":"10.0.1","next":"9.0.0-beta.0"}}