mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 23:50:19 +00:00
Update dotnet version in testing
This commit is contained in:
parent
c9bfd3d0ab
commit
bd1b06a361
@ -142,13 +142,13 @@ describe('installer tests', () => {
|
|||||||
|
|
||||||
it('Acquires version of dotnet from global.json if no matching version is installed', async () => {
|
it('Acquires version of dotnet from global.json if no matching version is installed', async () => {
|
||||||
const globalJsonPath = path.join(process.cwd(), 'global.json');
|
const globalJsonPath = path.join(process.cwd(), 'global.json');
|
||||||
const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "2.2.105"${os.EOL}}${os.EOL}}`;
|
const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "3.1.201"${os.EOL}}${os.EOL}}`;
|
||||||
if (!fs.existsSync(globalJsonPath)) {
|
if (!fs.existsSync(globalJsonPath)) {
|
||||||
fs.writeFileSync(globalJsonPath, jsonContents);
|
fs.writeFileSync(globalJsonPath, jsonContents);
|
||||||
}
|
}
|
||||||
await setup.run();
|
await setup.run();
|
||||||
|
|
||||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '2.2.105'))).toBe(true);
|
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.201'))).toBe(true);
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
|
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user