{"name":"espower-typescript","version":"2.0.0","description":"power-assert instrumentor for TypeScript","main":"index.js","scripts":{"test":"mocha --require './guess' test/*_test.ts"},"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.2.5","power-assert":"^1.1.0"},"dependencies":{"espower-source":"^1.0.0","minimatch":"^3.0.0","typescript-simple":"^3.0.2"},"gitHead":"1ba99ea4024b2fa96e3c5bc50d54d00ff7d68c78","_id":"espower-typescript@2.0.0","_shasum":"d99e3e9af86ba84a99f5534d8bf85bc5a8df9aa6","_from":".","_npmVersion":"2.14.9","_nodeVersion":"4.2.2","_npmUser":{"name":"teppeis","email":"teppeis@gmail.com"},"maintainers":[{"name":"teppeis","email":"teppeis@gmail.com"},{"name":"twada","email":"takuto.wada@gmail.com"}],"dist":{"shasum":"d99e3e9af86ba84a99f5534d8bf85bc5a8df9aa6","tarball":"http://registry-npm.ywwl.com/espower-typescript/download/espower-typescript-2.0.0.tgz","integrity":"sha512-7qP1VpgQw6UsgDF5QMg7LZv5s6LIYw64UUlOmdilgI96IqC+reLXuxIF/bdW/YuCMpqQ6e5Qo7tgx0uPGmDfNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAWg+sSbAKK4sD2+sXiNs9kSETqK9ODIgFlOyJQT6VMHAiBlC+avgI1prR+uJZdvkPMsc7eRHtn14UwhwxgUCv0xvA=="}],"size":2460,"noattachment":false,"key":"/espower-typescript/-/espower-typescript-2.0.0.tgz"},"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":1446716545713,"_cnpm_publish_time":1446716545713,"dist-tags":{"latest":"10.0.1","next":"9.0.0-beta.0"}}