Recently I found myself having to bundle the tests to overcome all the hurdles caused by combinations of AVA, TypeScript and type: "module" (vadimdemedes/dom-chef#68 and refined-github/refined-github#3206), so having AVA support some kind of build step might be helpful.
{
"ava": {
"build": "rollup --config --out tests tests/_source/*"
}
}
Advantages over rollup && ava
- running straight
ava without having to run an npm script first
- running
ava --watch would trigger the build as well
Additionally, it could automatically handle the creation of a temporary build folder
{
"ava": {
// Notice there's no "source" folder anymore because AVA would treat $TEMP as the test folder
"build": "rollup --config --out $TEMP tests/*"
}
}
Additional advantages
- not having to figure out and manually configure the temporary middle folder for git, AVA, XO
Recently I found myself having to bundle the tests to overcome all the hurdles caused by combinations of AVA, TypeScript and
type: "module"(vadimdemedes/dom-chef#68 and refined-github/refined-github#3206), so having AVA support some kind of build step might be helpful.{ "ava": { "build": "rollup --config --out tests tests/_source/*" } }Advantages over
rollup && avaavawithout having to run an npm script firstava --watchwould trigger the build as wellAdditionally, it could automatically handle the creation of a temporary build folder
Additional advantages