Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bf4a7dff9b |
@@ -3,9 +3,6 @@ module.exports = {
|
||||
testEnvironment: "node",
|
||||
roots: ["<rootDir>/src"],
|
||||
testMatch: ["**/*.spec.ts"],
|
||||
moduleNameMapper: {
|
||||
"^@actions/core$": "<rootDir>/src/__mocks__/actions-core.ts",
|
||||
},
|
||||
transform: {
|
||||
"^.+\\.ts$": "ts-jest",
|
||||
},
|
||||
|
||||
Generated
+4
-4
@@ -17,7 +17,7 @@
|
||||
"esbuild": "0.28.0",
|
||||
"jest": "30.4.2",
|
||||
"prettier": "3.8.3",
|
||||
"ts-jest": "29.4.11",
|
||||
"ts-jest": "29.4.10",
|
||||
"typescript": "5.9.3"
|
||||
}
|
||||
},
|
||||
@@ -5249,9 +5249,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ts-jest": {
|
||||
"version": "29.4.11",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.11.tgz",
|
||||
"integrity": "sha512-IrFl7l9AuB/qrNw5quqvAv/hmKMb8dhWOH4jQOGo0Oq8tCeo1O86/iTFG1FaRimgUkF13l4PcepO8ATFT6Ns4g==",
|
||||
"version": "29.4.10",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.10.tgz",
|
||||
"integrity": "sha512-vMTlTTtvz5aKZgzOoc7DQ5TzAL2fCzl8JnG1+ZpwjQa/g0xLlwE44yQ+1Cao9ZP1xVv9y5g34IFXEiqGOGFBUA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
"esbuild": "0.28.0",
|
||||
"jest": "30.4.2",
|
||||
"prettier": "3.8.3",
|
||||
"ts-jest": "29.4.11",
|
||||
"ts-jest": "29.4.10",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
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();
|
||||
+3
-1
@@ -439,7 +439,9 @@ describe("LocalCoreService", () => {
|
||||
localCoreService = new LocalCoreService();
|
||||
});
|
||||
|
||||
// @actions/core is mocked via jest.config.js moduleNameMapper
|
||||
// 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
|
||||
|
||||
it("should have all required methods", () => {
|
||||
expect(typeof localCoreService.getInput).toBe("function");
|
||||
|
||||
Reference in New Issue
Block a user