mirror of
https://github.com/robinraju/release-downloader.git
synced 2026-10-02 08:46:05 +03:00
Fix test failure on windows runner (#461)
This commit is contained in:
1 parent
d2289472cc
commit
374ee7fc96
2 files changed
+6
-8
No files matched your search
@@ -30,7 +30,8 @@ jobs:
|
||||
node-version: 16
|
||||
cache: 'npm'
|
||||
|
||||
- name: Build and test
|
||||
- name: Build and test
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run all
|
||||
|
||||
@@ -6,12 +6,11 @@ import * as thc from "typed-rest-client/HttpClient"
|
||||
|
||||
import {IReleaseDownloadSettings} from "../src/download-settings"
|
||||
import {ReleaseDownloader} from "../src/release-downloader"
|
||||
|
||||
const nock = require("nock")
|
||||
import nock from "nock"
|
||||
|
||||
let downloader: ReleaseDownloader
|
||||
let httpClent: thc.HttpClient
|
||||
const outputFilePath = "./target"
|
||||
const outputFilePath = "./test-output"
|
||||
|
||||
beforeEach(() => {
|
||||
const githubtoken = process.env.REPO_TOKEN || ""
|
||||
@@ -64,8 +63,8 @@ beforeEach(() => {
|
||||
.replyWithFile(200, __dirname + "/resource/assets/file_example.csv")
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
io.rmRF(outputFilePath)
|
||||
afterEach(async () => {
|
||||
await io.rmRF(outputFilePath)
|
||||
})
|
||||
|
||||
function readFromFile(fileName: string): string {
|
||||
@@ -141,7 +140,6 @@ test("Download multiple pdf files with wildcard filename", async () => {
|
||||
outFilePath: outputFilePath
|
||||
}
|
||||
const result = await downloader.download(downloadSettings)
|
||||
core.info(`Result from download: ${result}`)
|
||||
expect(result.length).toBe(2)
|
||||
}, 10000)
|
||||
|
||||
@@ -156,6 +154,5 @@ test("Download a csv file with wildcard filename", async () => {
|
||||
outFilePath: outputFilePath
|
||||
}
|
||||
const result = await downloader.download(downloadSettings)
|
||||
core.info(`Result from download: ${result}`)
|
||||
expect(result.length).toBe(1)
|
||||
}, 10000)
|
||||
Reference in new issue
Block a user