Skip to content

Commit 6c85d97

Browse files
hsbtclaude
andcommitted
Fix os mock for @actions/core 1.11.x platform module compatibility
@actions/core 1.11.0 added a platform module that calls os.platform() at import time via __importDefault, which requires a `default` export on the mocked os module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f13b432 commit 6c85d97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

__tests__/main.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jest.mock('os', () => {
2222

2323
return {
2424
__esModule: true, // Use it when dealing with esModules
25+
default: originalModule,
2526
...originalModule,
2627
homedir: jest.fn()
2728
}

0 commit comments

Comments
 (0)