[BUG] Unable to generate test class on Windows (test class generation script bugs) #988
Open
3 tasks done
Labels
bug
something not go good
Is there an existing issue for this?
Have you read the
CONTRIBUTING
guide on posting bugs, andCODE_OF_CONDUCT
?This issue exists in the latest tap version
Description
There are two issues in the
src/test/scripts/build.mts
that lead to being unable to generate the test class on Windows:npm run prepare
fails silently if it failsnpm
available on the path (i.e. Windows, which has anpm.cmd
instead), the script fails with a ENOENT, which is never shown to the userBecause a) the fail is silent and b) there is an existing test-built in the packages distributed on npm, this leads to the user being able to run tests but unable to install 3rd-party plugins.
The fixes are respectively:
spawnSync
and fail if the script if something happenscross-spawn
instead of Node's spawn, or manually add a.cmd
if on WindowsReproduction
Main symptom:
tap plugin add
due to a separate issue ([BUG] Cannottap plugin add
on Windows #989)tap build
console.log(t.pluginSignature)
in a test fileYour plugin will not be there.
Environment
On Windows, latest tap
The text was updated successfully, but these errors were encountered: