{"name":"espower-typescript","version":"6.0.2","description":"power-assert instrumentor for TypeScript","main":"index.js","scripts":{"demo":"mocha --require './guess' test/demo.ts","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":"^3.1.2","power-assert":"^1.2.0","react":"^15.3.2"},"dependencies":{"espower-source":"^1.1.0","minimatch":"^3.0.3","typescript":"~2.0.3","typescript-simple":"^6.0.1"},"gitHead":"0c12cc8521e4895d4154215bad61cb6d9b953b55","_id":"espower-typescript@6.0.2","_shasum":"3793b748faafcf5487e423e25a16d69589071b0f","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"teppeis","email":"teppeis@gmail.com"},"maintainers":[{"name":"teppeis","email":"teppeis@gmail.com"},{"name":"twada","email":"takuto.wada@gmail.com"}],"dist":{"shasum":"3793b748faafcf5487e423e25a16d69589071b0f","tarball":"http://registry-npm.ywwl.com/espower-typescript/download/espower-typescript-6.0.2.tgz","integrity":"sha512-rvLI8DxB/brWAkFP75IZglqh6qv/rYKWCPUWgsA7lusqMb4Yj8UXTZXfb20rdAscu1YsbgOmZVPDEV+GqlUHiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWuYXfcV3991Ggy95J79Hah4Q+FkjbR8PTl6L1VL7qNgIga02iGHzvz3fTQsfMKnpRD9jhshRZWZBVW+7MTcLnC8o="}],"size":3683,"noattachment":false,"key":"/espower-typescript/-/espower-typescript-6.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/espower-typescript-6.0.2.tgz_1481454013020_0.34886494441889226"},"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":1481454013264,"_cnpm_publish_time":1481454013264,"dist-tags":{"latest":"10.0.1","next":"9.0.0-beta.0"}}