jest-coverage-report-action icon indicating copy to clipboard operation
jest-coverage-report-action copied to clipboard

double hyphen not working for pnpm version >=7

Open vlkerag opened this issue 1 year ago • 0 comments

Discussed in https://github.com/ArtiomTr/jest-coverage-report-action/discussions/406

Originally posted by vlkerag January 19, 2024

The double hyphen appears to not be working for pnpm >=7

const isNpmStyle = command.startsWith('npm') || command.startsWith('pnpm');  command, // add two hypens if it is npm or pnpm package managers and two hyphens don't already exist isNpmStyle && !hasDoubleHyphen && '--',

Version <7 is working fine:

pnpm --version 6.2.1

pnpm test:unit -- --ci --json --coverage --testLocationInResults --outputFile=report.json ... Test Suites: 16 passed, 16 total Tests: 328 passed, 328 total Snapshots: 4 passed, 4 total Time: 7.577 s Ran all test suites. Test results written to: report.json

Version >=7 is not detecting tests with the double hyphens: pnpm --version 7.2.1

pnpm test:unit -- --ci --json --coverage --testLocationInResults --outputFile=report.json No tests found, exiting with code 1

Version >=7 is working fine when removing the double hyphens: pnpm --version 7.2.1

pnpm test:unit --ci --json --coverage --testLocationInResults --outputFile=report.json ... Test Suites: 16 passed, 16 total Tests: 328 passed, 328 total Snapshots: 4 passed, 4 total Time: 9.823 s Ran all test suites. Test results written to: report.json

vlkerag avatar Jan 26 '24 15:01 vlkerag