Skip to content

Commit 88efa68

Browse files
yuzurihaaaclaude
andcommitted
Refactor github mock to use Context class
Co-Authored-By: Claude <[email protected]>
1 parent 0251b05 commit 88efa68

3 files changed

Lines changed: 4 additions & 50 deletions

File tree

__mocks__/@actions/github.js

Lines changed: 0 additions & 49 deletions
This file was deleted.

__tests__/mock/github-mock.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import {Context} from '@actions/github/lib/context';
2+
3+
export const context = new Context();

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ module.exports = {
99
},
1010
verbose: true,
1111
moduleNameMapper: {
12-
'^@actions/github$': '<rootDir>/__mocks__/@actions/github.js'
12+
'^@actions/github$': '<rootDir>/__tests__/mock/github-mock.ts'
1313
}
1414
}

0 commit comments

Comments
 (0)