Commit f96ae64
EC-76387: [Alternative] Fix ESM compatibility with simpler mocking approach (#1215)
* Bump @actions/core from 2.0.3 to 3.0.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 2.0.3 to 3.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)
---
updated-dependencies:
- dependency-name: "@actions/core"
dependency-version: 3.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* EC-76387: Fix ESM compatibility with simpler mocking approach
The @actions/core v3.0.0 upgrade introduces ESM-only modules which breaks Jest tests.
This PR uses a simpler approach than jest.unstable_mockModule:
- Creates simple fake objects instead of module-level mocking
- Uses helper functions for cleaner, more readable tests
- Still requires Jest ESM configuration changes
Changes:
- Updated Jest config to support ESM modules
- Added --experimental-vm-modules flag to npm test script
- Refactored eventService.test.ts to use simple fake objects
Co-Authored-By: Mikkel Sander Guntveit <mikkel.guntveit@visma.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ecoai-bot <ecoai-bot@e-conomic.com>
Co-authored-by: Mikkel Sander Guntveit <mikkel.guntveit@visma.com>1 parent 4ef04be commit f96ae64
4 files changed
Lines changed: 184 additions & 315 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments