mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-14 20:55:11 +00:00
Fix tests
This commit is contained in:
parent
b9a316b3dd
commit
83d14b2c64
@ -10,6 +10,8 @@ process.env['RUNNER_TOOLSDIRECTORY'] = toolDir;
|
|||||||
process.env['RUNNER_TEMPDIRECTORY'] = tempDir;
|
process.env['RUNNER_TEMPDIRECTORY'] = tempDir;
|
||||||
import * as installer from '../src/installer';
|
import * as installer from '../src/installer';
|
||||||
|
|
||||||
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
|
|
||||||
describe('installer tests', () => {
|
describe('installer tests', () => {
|
||||||
beforeAll(() => {});
|
beforeAll(() => {});
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
@ -31,7 +33,11 @@ describe('installer tests', () => {
|
|||||||
const nodeDir = path.join(toolDir, 'dncs', '2.2.104', os.arch());
|
const nodeDir = path.join(toolDir, 'dncs', '2.2.104', os.arch());
|
||||||
|
|
||||||
expect(fs.existsSync(`${nodeDir}.complete`)).toBe(true);
|
expect(fs.existsSync(`${nodeDir}.complete`)).toBe(true);
|
||||||
|
if (IS_WINDOWS) {
|
||||||
expect(fs.existsSync(path.join(nodeDir, 'dotnet.exe'))).toBe(true);
|
expect(fs.existsSync(path.join(nodeDir, 'dotnet.exe'))).toBe(true);
|
||||||
|
} else {
|
||||||
|
expect(fs.existsSync(path.join(nodeDir, 'dotnet'))).toBe(true);
|
||||||
|
}
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
it('Throws if no location contains correct dotnet version', async () => {
|
it('Throws if no location contains correct dotnet version', async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user