{"name":"espower-typescript","description":"power-assert instrumentor for TypeScript","version":"10.0.1","author":{"name":"Teppei Sato","email":"teppeis@gmail.com"},"engines":{"node":">=10.17"},"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":"^5.1.0","source-map-support":"^0.5.12","ts-node":"^10.9.1"},"devDependencies":{"@types/mocha":"^8.2.0","@types/node":"^10.17.51","@types/react":"^17.0.0","eslint":"^7.18.0","eslint-config-teppeis":"^12.0.0","mocha":"^8.2.1","npm-run-all":"^4.1.3","power-assert":"^1.6.1","react":"^17.0.1","typescript":"^4.7.4"},"peerDependencies":{"typescript":">= 2.7"},"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":"fd6e3d0a94274eadcc5f9ce4f79f06fbbe29f921","_id":"espower-typescript@10.0.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-Otz3g+JKQCPG3CxyUQnmcmr9LeYXe+bEU2F/WtBeaByIj+kgR+8lyYSa1Rcqh27b/sp9EjrDLDUTW+d7dsfJQw==","shasum":"74bd08b59d8e4482bf6b7763928ab1a414f8dc53","tarball":"http://registry-npm.ywwl.com/espower-typescript/download/espower-typescript-10.0.1.tgz","fileCount":4,"unpackedSize":7649,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxWbhutSREuQmEIdfZN+GqsVCH1j0JOfvcak0TwwGpjAiEAgdMH8b4iXpebbvrxj0fs4c8x302CFHyW3q5e73ia7zQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5/zqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+ZA//d2w+x+0MvD69NaMzbnUlXNoauQIxp9Ld42LoLUrQdopO1r5c\r\nb3k2dfJHJcCRqEtCGE+kA9PlzqcV+i0jaNKsTgNGfblq10hLFgzck3WMIB9u\r\n5/YuRaWNBVPJD/NSDxFYhyhWZyP1/T72DC490xfFwK1M6kyVzJxLiKrFD1gc\r\nrxuCrf7ZxKWEXKbzXsVNZC+9cM6syXF65wzwOXIalivP7mOkLTuxLneKF0J3\r\ncs4KOzOEH7Gp2HOA211kDCcAOg+OwlCwBCBpaA88PnJdQZVuWtWVkDiFDrTz\r\nbp3OxO9pAIQUWAfwT0qGbTwh6o3kUsAA38heoPhzLry+XR/BvpVFui0uwhQx\r\ntIRgsskmoymjeK+vcSdgmEz4ULQc8clzPaQQbc+TSzHvdFqdkHzDU4Gj6L49\r\nZl/YBM6+Y+8XsI9wIUlx480CmJ3n/iDQ91KQyQSc6tNCyeTCmENibLsGmY8g\r\nk/xltT5DSzjmpclDlrQChkLH3Vmfhi0XHh58RzwiK7IaSttpZqaTmvmAO4ua\r\ndjBwVkHK+StY2X0PwXqZLGu4TAtZJLLBlVCd1tb6lSbFqfg34b7oC61HRMyS\r\nGBaZgOAWy7JN+201Zzl2WMFLNjS4vmjN5Ce+pe3qDlcu37hESb+dYY9TImFJ\r\nF4aDRSgLJFwn9XYEaIrWhzNe1y4X7Hwbvdo=\r\n=4pP3\r\n-----END PGP SIGNATURE-----\r\n","size":2865,"noattachment":false,"key":"/espower-typescript/-/espower-typescript-10.0.1.tgz"},"_npmUser":{"name":"teppeis","email":"teppeis@gmail.com"},"directories":{},"maintainers":[{"name":"twada","email":"takuto.wada@gmail.com"},{"name":"teppeis","email":"teppeis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/espower-typescript_10.0.1_1659370730704_0.6895384811216747"},"_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":1659370730956,"_cnpm_publish_time":1659370730956,"dist-tags":{"latest":"10.0.1","next":"9.0.0-beta.0"}}