Skip to content

Commit

Permalink
[PublishCodeCoverageResultsV2] Migrate PublishCodeCoverageResultsV2 t…
Browse files Browse the repository at this point in the history
…o Node20 (#19441)

* [PublishCodeCoverageResultsV2] Migrate PublishCodeCoverageResultsV2 to Node20

- Migrated PublishCodeCoverageResultsV2 to Node20
- Bumped task-lib version to 5.x
- Bumped task-lib versoin in codecoveragre common package

* [PublishCodeCoverageResultsV2] Migrate PublishCodeCoverageResultsV2 to Node20

- Bumped task-lib version to 5.x
- Bumped task-lib versoin in codecoveragre common package

* [PublishCodeCoverageResultsV2] Migrate PublishCodeCoverageResultsV2 to Node20

- Add npm 10 compability for common packages
  • Loading branch information
DmitriiBobreshev authored Jan 15, 2024
1 parent a83b36f commit 336d467
Show file tree
Hide file tree
Showing 40 changed files with 10,134 additions and 126 deletions.
76 changes: 21 additions & 55 deletions Tasks/Common/coveragepublisher/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tasks/Common/coveragepublisher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/Microsoft/vso-agent-tasks/issues"
},
"dependencies": {
"azure-pipelines-task-lib": "^4.1.0",
"azure-pipelines-task-lib": "^5.0.1-preview.0",
"@types/node": "^16.11.39",
"os": "^0.1.1",
"uuid": "^3.3.2"
Expand Down
12 changes: 4 additions & 8 deletions Tasks/PublishCodeCoverageResultsV2/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,20 @@ describe('PublishCodeCoverageResultsV2 Suite', function () {
process.env["AGENT_TEMPDIRECTORY"] = process.cwd();
});

it('Publish Code coverage results with Summary file matches', function(done: MochaDone) {
it('Publish Code coverage results with Summary file matches', async function() {
const testPath = path.join(__dirname, 'L0SummaryFileLocationMatches.ts')
const tr: MockTestRunner = new MockTestRunner(testPath);
tr.run();
await tr.runAsync();

assert(tr.succeeded, 'task should have succeeded');

done();
});

it('Publish Code coverage results should work fine with empty results', function(done: MochaDone) {
it('Publish Code coverage results should work fine with empty results', async function() {
const testPath = path.join(__dirname, 'L0NotFailWithEmptyResults.ts')
const tr: MockTestRunner = new MockTestRunner(testPath);
tr.run();
await tr.runAsync();

assert(tr.succeeded, 'task should have succeeded'); // It will give a message of No code coverage for empty inputs

done();
});

});
Loading

0 comments on commit 336d467

Please sign in to comment.