Closed bitjson closed 4 years ago
This works well now, so I'm happy to leave it as-is. I just wanted to mention that it differed from my initial impression of how
rewritePaths
would work. I thought settingsrc/
tobuild/main/
would map files in those directories one-to-one, but AVA seems to also be searching inbuild/module/
without the specific exclusion.
AVA still searches the entire project for *.js
, *.cjs
, *.mjs
and *.ts
files. The TypeScript integration is now smart enough to tell AVA to ignore build/main/
, but it doesn't know about build/module/
.
Would documentation help here? Looks like you figured out AVA's behavior pretty quick?
(Thanks again for v3 of AVA and the improved Typescript integration! Even debugging is working beautifully now.)
😍
(I'm closing this issue for housekeeping purposes, but let's keep the conversation going.)
AVA still searches the entire project for
*.js
,*.cjs
,*.mjs
and*.ts
files. The TypeScript integration is now smart enough to tell AVA to ignorebuild/main/
, but it doesn't know aboutbuild/module/
.
Ah, that makes much more sense. I only figured out I needed to ignore the contents of build/module
when I added some console.log
s to AVA in node_modules
. 😅
Would documentation help here? Looks like you figured out AVA's behavior pretty quick?
Ya, I think an explanation of rewritePaths
in the readme would be helpful. It took me a while to look in the right places, and even then, I went away thinking it was a bug.
Fair enough.
Let's add something like this to the rewritePaths
section in the README:
AVA searches your entire project for
*.js
,*.cjs
,*.mjs
and*.ts
files (or other extensions you've configured). It will ignore such files found in therewritePaths
targets (e.g.build/
). If you use more specific paths, for instancebuild/main/
, you may need to change AVA'sfiles
configuration to ignore other directories.
What do you think?
That’s perfect 👍
Thank you for this project! I migrated bitcoin-ts recently, and I just wanted to note an issue I had.
My Typescript project builds the same source to two different output locations, one
build/main/
for Node.js usage and onebuild/module/
for consumers which use build tools like Rollup.I primarily test against the
build/main/
build, so the configuration seemed simple:But with that configuration, AVA was also trying to test files in the
build/module/
folder. I ended up needing to add an exclusion:This works well now, so I'm happy to leave it as-is. I just wanted to mention that it differed from my initial impression of how
rewritePaths
would work. I thought settingsrc/
tobuild/main/
would map files in those directories one-to-one, but AVA seems to also be searching inbuild/module/
without the specific exclusion.(Thanks again for v3 of AVA and the improved Typescript integration! Even debugging is working beautifully now.)