Skip to content

Commit b68f819

Browse files
CopilotEndBug
andcommitted
refactor: remove unnecessary moduleNameMappers from Jest config
The explicit moduleNameMappers for @actions/core and @actions/github were not needed. The transformIgnorePatterns configuration is sufficient to handle ESM modules from @actions packages. Only the relative import mapper is required for TypeScript ESM compatibility. Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>
1 parent 87f7451 commit b68f819

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

jest.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ export default {
55
extensionsToTreatAsEsm: ['.ts'],
66
moduleNameMapper: {
77
'^(\\.{1,2}/.*)\\.js$': '$1',
8-
'^@actions/core$': '<rootDir>/node_modules/@actions/core/lib/core.js',
9-
'^@actions/github$': '<rootDir>/node_modules/@actions/github/lib/github.js',
108
},
119
transform: {
1210
'^.+\\.tsx?$': [

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)