Compare commits
1 Commits
bf4a7dff9b
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b8806ee014 |
@@ -3,6 +3,9 @@ module.exports = {
|
||||
testEnvironment: "node",
|
||||
roots: ["<rootDir>/src"],
|
||||
testMatch: ["**/*.spec.ts"],
|
||||
moduleNameMapper: {
|
||||
"^@actions/core$": "<rootDir>/src/__mocks__/actions-core.ts",
|
||||
},
|
||||
transform: {
|
||||
"^.+\\.ts$": "ts-jest",
|
||||
},
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export const getInput = jest.fn(() => "");
|
||||
export const info = jest.fn();
|
||||
export const warning = jest.fn();
|
||||
export const setOutput = jest.fn();
|
||||
export const setFailed = jest.fn();
|
||||
+1
-3
@@ -439,9 +439,7 @@ describe("LocalCoreService", () => {
|
||||
localCoreService = new LocalCoreService();
|
||||
});
|
||||
|
||||
// Note: These tests would require mocking the @actions/core module
|
||||
// In a real implementation, you might want to use jest.mock() to mock the entire module
|
||||
// For now, we'll just test that the methods exist and can be called
|
||||
// @actions/core is mocked via jest.config.js moduleNameMapper
|
||||
|
||||
it("should have all required methods", () => {
|
||||
expect(typeof localCoreService.getInput).toBe("function");
|
||||
|
||||
Reference in New Issue
Block a user