oven-sh / bun

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

Support `c8` code coverage #6715

Open Electroid opened 1 year ago

Electroid commented 1 year ago

https://github.com/bcoe/c8

baphony commented 7 months ago

C8 works for me on Bun v1.1.3

viktorlajos1989 commented 3 months ago

C8 works for me on Bun v1.1.3

Could you share how are you doing? It is not working for me like this:

c8 --all bun run test:coverage

baphony commented 3 months ago
{
    "scripts": {
        "ut": "cross-env TS_NODE_FILES=true mocha --exit --reporter-options configFile=mocha-multi-reporters-config.json",
        "test": "c8 bun ut"
    },
    "devDependencies": {
        "c8": "^8.0.1"
    }
}
bun run test

I hope this helps