istanbuljs / nyc

the Istanbul command line interface
https://istanbul.js.org/
ISC License
5.59k stars 359 forks source link

get wrong window.__coverage__ #1492

Open yuuulinnn opened 1 year ago

yuuulinnn commented 1 year ago

Link to bug demonstration repository

Expected Behavior

my project use vue/ts/js and we don‘t have a test framework,so we test by people. I expect: 1.Instrument code 2.Excute new code in output 3.Manually log in to the system for testing 4.Get window.coverage to generate a html report after i run "nyc instrument ./src ./output --delete && nyc vue-cli-service serve ./output/main" ,the coverage doesn't contain vue,js,ts ,but only have js in node_modules

Observed Behavior

image

Troubleshooting steps