Another attempt to fix tests

This commit is contained in:
Nick Cipollo
2020-07-20 22:40:44 -04:00
parent 7ca6e41462
commit 83aacbf1b5

View File

@@ -3,10 +3,10 @@ const mockGlob = jest.fn()
const mockReadFileSync = jest.fn();
const mockStatSync = jest.fn();
import { Artifact } from "../src/Artifact";
import { ArtifactGlobber } from "../src/ArtifactGlobber";
import { Context } from "@actions/github/lib/context";
import { Inputs, CoreInputs } from "../src/Inputs";
import {Artifact} from "../src/Artifact";
import {ArtifactGlobber} from "../src/ArtifactGlobber";
import {Context} from "@actions/github/lib/context";
import {Inputs, CoreInputs} from "../src/Inputs";
const artifacts = [
new Artifact('a/art1'),
@@ -14,11 +14,14 @@ const artifacts = [
]
jest.mock('@actions/core', () => {
return { getInput: mockGetInput };
return {getInput: mockGetInput};
})
jest.mock('fs', () => {
return {
existsSync: () => {
return false
},
readFileSync: mockReadFileSync,
statSync: mockStatSync
};