{"name":"espower-typescript","version":"5.0.1","description":"power-assert instrumentor for TypeScript","main":"index.js","scripts":{"test:outdir":"cd test/test-outdir && mocha --require ../../guess test/*_test.ts","test":"mocha --require './guess' test/*_test.ts && npm run test:outdir"},"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"},"homepage":"https://github.com/power-assert-js/espower-typescript","keywords":["power-assert","typescript"],"author":{"name":"Teppei Sato","email":"teppeis@gmail.com"},"license":"MIT","devDependencies":{"expect.js":"^0.3.1","mocha":"^2.4.5","power-assert":"^1.2.0","react":"^0.14.7"},"dependencies":{"espower-source":"^1.1.0","minimatch":"^3.0.0","typescript":"~1.8.2","typescript-simple":"^5.0.0"},"gitHead":"3a47d7255a803a15b0a0dae8f26e485e61d23439","_id":"espower-typescript@5.0.1","_shasum":"7e2dc952ecb3ba6ceea2f89011d2722160e73123","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"teppeis","email":"teppeis@gmail.com"},"maintainers":[{"name":"teppeis","email":"teppeis@gmail.com"},{"name":"twada","email":"takuto.wada@gmail.com"}],"dist":{"shasum":"7e2dc952ecb3ba6ceea2f89011d2722160e73123","tarball":"http://registry-npm.ywwl.com/espower-typescript/download/espower-typescript-5.0.1.tgz","integrity":"sha512-s+8B6ppK1ZyUUapmUV8HM6yVGqQkMOEh6xEtzxncNPmXraQA+0RvxeEVLMTt5a4jca+4WXxxC3aSQFK46yBZEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9Zf/VPjcZ0DhTCyjJBwsSkOYBDyLUr9g/FO84v2S4WgIhAJUl/kEPQL4RZhZG8xvSNPMV4QTzDI2fouoVGUB3gMNY"}],"size":4471,"noattachment":false,"key":"/espower-typescript/-/espower-typescript-5.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/espower-typescript-5.0.1.tgz_1456648238582_0.13347367476671934"},"directories":{},"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":1456648239635,"_cnpm_publish_time":1456648239635,"dist-tags":{"latest":"10.0.1","next":"9.0.0-beta.0"}}