Skip to content

Commit 336d467

Browse files
[PublishCodeCoverageResultsV2] Migrate PublishCodeCoverageResultsV2 to 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
1 parent a83b36f commit 336d467

40 files changed

+10134
-126
lines changed

Tasks/Common/coveragepublisher/package-lock.json

+21-55
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/Common/coveragepublisher/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/Microsoft/vso-agent-tasks/issues"
88
},
99
"dependencies": {
10-
"azure-pipelines-task-lib": "^4.1.0",
10+
"azure-pipelines-task-lib": "^5.0.1-preview.0",
1111
"@types/node": "^16.11.39",
1212
"os": "^0.1.1",
1313
"uuid": "^3.3.2"

Tasks/PublishCodeCoverageResultsV2/Tests/L0.ts

+4-8
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,20 @@ describe('PublishCodeCoverageResultsV2 Suite', function () {
1010
process.env["AGENT_TEMPDIRECTORY"] = process.cwd();
1111
});
1212

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

1818
assert(tr.succeeded, 'task should have succeeded');
19-
20-
done();
2119
});
2220

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

2826
assert(tr.succeeded, 'task should have succeeded'); // It will give a message of No code coverage for empty inputs
29-
30-
done();
3127
});
3228

3329
});

0 commit comments

Comments
 (0)