mirror of
https://github.com/actions/toolkit.git
synced 2026-08-25 00:00:27 +02:00
@actions/tool-cache: convert to an ESM module (#2274)
* `@actions/tool-cache`: convert to an ESM module * Fix jest config * Downgrade `nock` since it's conflicting with `@actions/attest`'s version
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import * as tc from '../src/tool-cache'
|
||||
import * as mm from '../src/manifest' // --> OFF
|
||||
import * as tc from '../src/tool-cache.js'
|
||||
import * as mm from '../src/manifest.js'
|
||||
|
||||
// needs to be require for core node modules to be mocked
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
@@ -36,7 +36,7 @@ describe('@actions/tool-cache-manifest', () => {
|
||||
archSpy.mockImplementation(() => os.arch)
|
||||
|
||||
execSpy = jest.spyOn(cp, 'execSync')
|
||||
readLsbSpy = jest.spyOn(mm, '_readLinuxVersionFile')
|
||||
readLsbSpy = jest.spyOn(mm._internal, 'readLinuxVersionFile')
|
||||
|
||||
getSpy = jest.spyOn(tc, 'getManifestFromRepo')
|
||||
getSpy.mockImplementation(() => <mm.IToolRelease[]>manifestData)
|
||||
|
||||
Reference in New Issue
Block a user