修改下载接口参数bug
Continuous Integration / GitHub Actions Test (push) Failing after 25s Details

This commit is contained in:
walker 2024-03-18 10:29:34 +08:00
parent b308ef4afc
commit d962fec1ad
4 changed files with 3 additions and 28 deletions

View File

@ -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)
})
})

2
dist/index.js vendored
View File

@ -80809,7 +80809,7 @@ async function run() {
if (!rcr) {
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) {
throw new Error(`Failed to download`);
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ export async function run(): Promise<void> {
if (!rcr) {
core.info(`Cache not found for input key: ${ck}`)
// 缓存中没有找到,下载解压安装
const filepath = await download(version)
const filepath = await download(ck)
if (!filepath) {
throw new Error(`Failed to download`)
}