mirror of
https://github.com/Minionguyjpro/Inno-Setup-Action
synced 2026-02-18 17:41:18 +01:00
Update main.test.js
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
const core = require("@actions/core");
|
const core = require("@actions/core");
|
||||||
|
|
||||||
// Mocking the entire @actions/core module
|
// Mocking specific methods of @actions/core
|
||||||
jest.mock("@actions/core");
|
|
||||||
|
|
||||||
// Mocking specific methods
|
|
||||||
core.getInput = jest.fn().mockReturnValueOnce("options").mockReturnValueOnce("path");
|
core.getInput = jest.fn().mockReturnValueOnce("options").mockReturnValueOnce("path");
|
||||||
core.setFailed = jest.fn();
|
core.setFailed = jest.fn();
|
||||||
|
|
||||||
@@ -19,7 +16,7 @@ jest.mock('child_process', () => ({
|
|||||||
}),
|
}),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Now, you can import and test your main.js module
|
// Importing the main module after the mocks are set
|
||||||
const main = require("../src/main");
|
const main = require("../src/main");
|
||||||
|
|
||||||
// Add your test cases here
|
// Add your test cases here
|
||||||
|
|||||||
Reference in New Issue
Block a user