Autodesk-AutoCAD / AutoLispExt

Visual Studio Code Extension for AutoCAD® AutoLISP
https://marketplace.visualstudio.com/items?itemName=Autodesk.autolispext
Apache License 2.0
87 stars 30 forks source link

Decouple code coverage from npm test and add npm run cc command #110

Closed nigma456 closed 3 years ago

nigma456 commented 3 years ago
Objective

We want to run the code coverage separately from the npm test.

Abstractions

Use npm run cc command to do the codecoverage for the automation test Add argument --codecoverage in npm test script to run code coverage.

"cc": "npm run compile && node ./out/test/runTest.js --codecoverage"

Then run test or code coverage according to this argument: if (process.argv[2] === '--codecoverage') { extensionTestsPath = path.resolve(dirname, './suite/codeCoverage'); } else { extensionTestsPath = path.resolve(dirname, './suite/index'); }

Tests performed

Passed local testing and Github CI

Screen shot