Throw when loading a TypeScript file that is not covered by the rewrite paths
- Dominant language
- JavaScript
- Stars
- 76
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
This is more like an anti-bug than an actual bug. But it seems like this project works even when I provide a nonsensical rewritePaths entry, for example:
```json
"typescript": {
"rewritePaths": {
"meaninglessdirectory/": "jababababa/"
}
},
```
Shouldn't ava crash if this occurs?
Here's the repository ("ava" branch): https://github.com/vedantroy/typecheck.macro
Check out the repository, switch to the ava branch, and then run `npm i && npm run test`.
**What happens** The tests run successfully. You can show that ava is not using the js file by renaming `temp_build/test.js` to `temp_build/foobar.js` and then executing `npm run test:run`. The tests will still execute. You can even modify `tests/test.ts`, maybe add an extra `console.log` statement, then run `npm run test:run`, and the new output will be printed. Does ava now support typescript natively, or am I missing something?
**What you expected to happen**: Ava should crash or something because inside of my package.json, I have a meaningless typescript configuration.
Ava version: 3.7.1
Contributor guide
Research direction
Check out the ava branch, inspect package.json for the rewritePaths configuration and test scripts, then run npm i && npm run test followed by npm run test:run. Use temp_build/test.js and tests/test.ts to reproduce the behavior; done means an uncovered TypeScript file or meaningless rewritePaths entry produces the expected failure instead of running successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100