We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preferTsExts
.js
.ts
index
"preferTsExts", "coverage", "index"
Following the below steps should result in 100% code coverage at all times
Coverage is not 100%
npm i
npm test
packages/object-id/index.ts
npm run build
packages/object-id/index.js
npm run build:clean
https://github.com/alecgibson/ts-node-prefer-ts-exts-bug
{ "compilerOptions": {}, "include": [ "lib/", "packages/", ], "ts-node": { "preferTsExts": true, }, }
{ "name": "ts-node-prefer-ts-exts-bug", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "build": "tsc", "build:clean": "tsc --build --clean", "test": "nyc mocha -r ts-node/register 'lib/**/*.spec.ts' 'packages/**/*.spec.ts'" }, "repository": { "type": "git", "url": "git+https://github.com/alecgibson/ts-node-prefer-ts-exts-bug.git" }, "author": "", "license": "ISC", "bugs": { "url": "https://github.com/alecgibson/ts-node-prefer-ts-exts-bug/issues" }, "homepage": "https://github.com/alecgibson/ts-node-prefer-ts-exts-bug#readme", "devDependencies": { "@types/chai": "^4.3.4", "@types/mocha": "^10.0.1", "chai": "^4.3.7", "mocha": "^10.2.0", "nyc": "^15.1.0", "ts-node": "^10.9.1", "typescript": "^4.9.5" }, "dependencies": { } }
Here are some things I've noted trying to put together the MWE:
- import {isObjectId} from '.'; + import {isObjectId} from './index';
- import {isObjectId} from '../packages/object-id'; + import {isObjectId} from '../packages/object-id/index';
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Search Terms
"preferTsExts", "coverage", "index"
Expected Behavior
Following the below steps should result in 100% code coverage at all times
Actual Behavior
Coverage is not 100%
Steps to reproduce the problem
npm i
npm test
packages/object-id/index.ts
npm run build
npm test
packages/object-id/index.ts
is uncovered, becausepackages/object-id/index.js
is being used insteadnpm run build:clean
, and coverage returns to 100%Minimal reproduction
https://github.com/alecgibson/ts-node-prefer-ts-exts-bug
Specifications
Notes
Here are some things I've noted trying to put together the MWE:
The text was updated successfully, but these errors were encountered: