oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.26k stars 2.69k forks source link

Bun test - combine parameter --preload --collectCoverageFrom #5818

Open Spomsoree opened 1 year ago

Spomsoree commented 1 year ago

What version of Bun is running?

1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983

What platform is your computer?

Darwin 22.6.0 arm64 arm

What steps can reproduce the bug?

Run bun test --coverage --collectCoverageFrom=./src/**/*.js --preload ./preload.js

What is the expected behavior?

I'd expect to be able to use both parameters.

What do you see instead?

Either collectCoverageFrom or preload is being processed, depending on which comes first.

Additional information

Another option would be to be able to set collectCoverageFrom in the config file, which also does not seem to work.

Electroid commented 1 year ago

This is likely a bug with how we're parsing CLI arguments.

Spomsoree commented 1 year ago

Same problem on 1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49

DWboutin commented 11 months ago

Same problem on 1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a with --preload and --bail

JudeDavis1 commented 10 months ago

Latest release that I downloaded seems to fix this.

JudeDavis1 commented 10 months ago

Thanks team.

vtcaregorodtcev commented 3 months ago

It seems like --collectCoverageFrom is not supported at all?