修改下载接口参数bug
Continuous Integration / GitHub Actions Test (push) Failing after 25s
Details
Continuous Integration / GitHub Actions Test (push) Failing after 25s
Details
This commit is contained in:
parent
b308ef4afc
commit
d962fec1ad
|
@ -1,25 +0,0 @@
|
||||||
/**
|
|
||||||
* Unit tests for src/wait.ts
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { wait } from '../src/wait'
|
|
||||||
import { expect } from '@jest/globals'
|
|
||||||
|
|
||||||
describe('wait.ts', () => {
|
|
||||||
it('throws an invalid number', async () => {
|
|
||||||
const input = parseInt('foo', 10)
|
|
||||||
expect(isNaN(input)).toBe(true)
|
|
||||||
|
|
||||||
await expect(wait(input)).rejects.toThrow('milliseconds not a number')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('waits with a valid number', async () => {
|
|
||||||
const start = new Date()
|
|
||||||
await wait(500)
|
|
||||||
const end = new Date()
|
|
||||||
|
|
||||||
const delta = Math.abs(end.getTime() - start.getTime())
|
|
||||||
|
|
||||||
expect(delta).toBeGreaterThan(450)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -80809,7 +80809,7 @@ async function run() {
|
||||||
if (!rcr) {
|
if (!rcr) {
|
||||||
core.info(`Cache not found for input key: ${ck}`);
|
core.info(`Cache not found for input key: ${ck}`);
|
||||||
// 缓存中没有找到,下载解压安装
|
// 缓存中没有找到,下载解压安装
|
||||||
const filepath = await (0, install_1.download)(version);
|
const filepath = await (0, install_1.download)(ck);
|
||||||
if (!filepath) {
|
if (!filepath) {
|
||||||
throw new Error(`Failed to download`);
|
throw new Error(`Failed to download`);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -30,7 +30,7 @@ export async function run(): Promise<void> {
|
||||||
if (!rcr) {
|
if (!rcr) {
|
||||||
core.info(`Cache not found for input key: ${ck}`)
|
core.info(`Cache not found for input key: ${ck}`)
|
||||||
// 缓存中没有找到,下载解压安装
|
// 缓存中没有找到,下载解压安装
|
||||||
const filepath = await download(version)
|
const filepath = await download(ck)
|
||||||
if (!filepath) {
|
if (!filepath) {
|
||||||
throw new Error(`Failed to download`)
|
throw new Error(`Failed to download`)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue