mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 15:40:20 +00:00
Try to fix tests.
This commit is contained in:
parent
4d5f2b0b14
commit
066137a1dc
@ -33,7 +33,7 @@ describe('installer tests', () => {
|
|||||||
}, 30000);
|
}, 30000);
|
||||||
|
|
||||||
it('Acquires version of dotnet if no matching version is installed', async () => {
|
it('Acquires version of dotnet if no matching version is installed', async () => {
|
||||||
await getDotnet('3.1.201', null);
|
await getDotnet('3.1.201', '');
|
||||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.201'))).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);
|
||||||
@ -48,7 +48,7 @@ describe('installer tests', () => {
|
|||||||
}, 600000); //This needs some time to download on "slower" internet connections
|
}, 600000); //This needs some time to download on "slower" internet connections
|
||||||
|
|
||||||
it('Acquires generic version of dotnet if no matching version is installed', async () => {
|
it('Acquires generic version of dotnet if no matching version is installed', async () => {
|
||||||
await getDotnet('3.1', null);
|
await getDotnet('3.1', '');
|
||||||
var directory = fs
|
var directory = fs
|
||||||
.readdirSync(path.join(toolDir, 'sdk'))
|
.readdirSync(path.join(toolDir, 'sdk'))
|
||||||
.filter(fn => fn.startsWith('3.1.'));
|
.filter(fn => fn.startsWith('3.1.'));
|
||||||
@ -86,7 +86,7 @@ describe('installer tests', () => {
|
|||||||
it('Throws if no location contains correct dotnet version', async () => {
|
it('Throws if no location contains correct dotnet version', async () => {
|
||||||
let thrown = false;
|
let thrown = false;
|
||||||
try {
|
try {
|
||||||
await getDotnet('1000.0.0', null);
|
await getDotnet('1000.0.0', '');
|
||||||
} catch {
|
} catch {
|
||||||
thrown = true;
|
thrown = true;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ describe('version tests', () => {
|
|||||||
]).test(
|
]).test(
|
||||||
"Resolving version '%s' as '%s'",
|
"Resolving version '%s' as '%s'",
|
||||||
async (input, expectedVersion) => {
|
async (input, expectedVersion) => {
|
||||||
const dotnetInstaller = new installer.DotnetCoreInstaller(input);
|
const dotnetInstaller = new installer.DotnetCoreInstaller(input, '');
|
||||||
let versInfo = await dotnetInstaller.resolveVersion(
|
let versInfo = await dotnetInstaller.resolveVersion(
|
||||||
new installer.DotNetVersionInfo(input)
|
new installer.DotNetVersionInfo(input)
|
||||||
);
|
);
|
||||||
@ -77,7 +77,7 @@ describe('version tests', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
it('Resolving a nonexistent generic version fails', async () => {
|
it('Resolving a nonexistent generic version fails', async () => {
|
||||||
const dotnetInstaller = new installer.DotnetCoreInstaller('999.1.x');
|
const dotnetInstaller = new installer.DotnetCoreInstaller('999.1.x', '');
|
||||||
try {
|
try {
|
||||||
await dotnetInstaller.resolveVersion(
|
await dotnetInstaller.resolveVersion(
|
||||||
new installer.DotNetVersionInfo('999.1.x')
|
new installer.DotNetVersionInfo('999.1.x')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user