mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +00:00
Update tests
This commit is contained in:
parent
34b2b22dcf
commit
b84de5a54c
1 changed files with 6 additions and 6 deletions
|
@ -81,8 +81,8 @@ describe('setup-go', () => {
|
||||||
os.arch = 'x64';
|
os.arch = 'x64';
|
||||||
|
|
||||||
// get request is already mocked
|
// get request is already mocked
|
||||||
// spec: 1.13.7 => 1.13.7 (exact)
|
// spec: 1.13.8 => 1.13.8 (exact)
|
||||||
let match: im.IGoVersion | undefined = await im.findMatch('1.13.7', true);
|
let match: im.IGoVersion | undefined = await im.findMatch('1.13.8', true);
|
||||||
expect(match).toBeDefined();
|
expect(match).toBeDefined();
|
||||||
let version: string = match ? match.version : '';
|
let version: string = match ? match.version : '';
|
||||||
expect(version).toBe('go1.13.8');
|
expect(version).toBe('go1.13.8');
|
||||||
|
@ -146,16 +146,16 @@ describe('setup-go', () => {
|
||||||
os.platform = 'linux';
|
os.platform = 'linux';
|
||||||
os.arch = 'x64';
|
os.arch = 'x64';
|
||||||
|
|
||||||
// spec: 1.14, stable=false => go1.14rc1
|
// spec: 1.14.1, stable=false => go1.14.1rc1
|
||||||
let match: im.IGoVersion | undefined = await im.findMatch(
|
let match: im.IGoVersion | undefined = await im.findMatch(
|
||||||
'1.14.0-rc1',
|
'1.14.1-rc1',
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
expect(match).toBeDefined();
|
expect(match).toBeDefined();
|
||||||
let version: string = match ? match.version : '';
|
let version: string = match ? match.version : '';
|
||||||
expect(version).toBe('go1.14rc1');
|
expect(version).toBe('go1.14.1rc1');
|
||||||
let fileName = match ? match.files[0].filename : '';
|
let fileName = match ? match.files[0].filename : '';
|
||||||
expect(fileName).toBe('go1.14rc1.linux-amd64.tar.gz');
|
expect(fileName).toBe('go1.14.1rc1.linux-amd64.tar.gz');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('evaluates to stable with input as true', async () => {
|
it('evaluates to stable with input as true', async () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue