Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated 6 tasks to Node20 #19133

Merged
merged 4 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions Tasks/CondaEnvironmentV0/Tests/L0_conda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,20 @@ it('fails if `conda` is not found', async function () {
updateConda: false
};

#if NODE20
let error: any | undefined;
#endif
try {
await uut.condaEnvironment(parameters, Platform.Windows);

throw new Error('should not have succeeded');
} catch (e) {
#if NODE20
error = e;
assert.strictEqual(error.message, 'loc_mock_CondaNotFound');
#else
assert.strictEqual(e.message, 'loc_mock_CondaNotFound');
#endif
assert(findConda.calledOnceWithExactly(Platform.Windows));
assert(prependCondaToPath.notCalled);
assert(createEnvironment.notCalled);
Expand Down
8 changes: 8 additions & 0 deletions Tasks/CondaEnvironmentV0/Tests/L0_conda_internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,19 @@ it('creates Conda environment', async function () {
}
});

#if NODE20
let error: any | undefined;
#endif
try {
await uut.createEnvironment(path.join('envsDir', 'env'));
throw new Error('should not have succeeded');
} catch (e) {
#if NODE20
error = e;
assert.strictEqual(error.message, `loc_mock_CreateFailed ${path.join('envsDir', 'env')} Error: conda failed with return code: 1`);
#else
assert.strictEqual(e.message, `loc_mock_CreateFailed ${path.join('envsDir', 'env')} Error: conda failed with return code: 1`);
#endif
}
}
});
Expand Down

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "conda-environment",
"version": "1.0.0",
"description": "Activate a Conda environment.",
"main": "conda.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Microsoft/azure-pipelines-tasks.git"
},
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/Microsoft/azure-pipelines-tasks/issues"
},
"homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme",
"devDependencies": {
"@types/mocha": "^5.2.0",
"@types/sinon": "^4.3.1",
"sinon": "^4.5.0"
}
}
Loading
Loading