wasmerio / wasmer-pack

MIT License
49 stars 5 forks source link

wasmer-pack-testing wasn't running "yarn jest" on MacOS/Linux #125

Open Michael-F-Bryan opened 1 year ago

Michael-F-Bryan commented 1 year ago

Description

This updates the way we invoke yarn to run the equivalent of sh -c "yarn jest" instead of sh -c "yarn" "jest". The latter version seems to be equivalent to a plain sh -c "yarn", which means every time we try to run yarn with a sub-command (to invoke tests, initialize package.json, add a dependency to package.json, etc.) we were just installing dependencies.

I'm guessing we originally missed this because cmd.exe /c "yarn" "jest" works on Windows (which is what @dynamite-bud used when implementing #120), and Wasmer Pack's CI was happy because running yarn by itself a bunch of times won't fail.

Context

When @dynamite-bud added JavaScript tests to his wasmerio/rustfft package (https://github.com/wasmerio/rustfft/pull/8), he noticed that none of the Jest tests were being run.

Checklist