mirror of
https://gitea.com/actions/setup-node.git
synced 2025-12-14 04:31:34 +08:00
Explicitly exit the process to not wait for hanging promises
See https://github.com/actions/setup-node/issues/878
This commit is contained in:
@@ -41,6 +41,7 @@ describe('setup-node', () => {
|
||||
let isCacheActionAvailable: jest.SpyInstance;
|
||||
let getExecOutputSpy: jest.SpyInstance;
|
||||
let getJsonSpy: jest.SpyInstance;
|
||||
let processExitSpy: jest.SpyInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
// @actions/core
|
||||
@@ -58,6 +59,9 @@ describe('setup-node', () => {
|
||||
archSpy = jest.spyOn(osm, 'arch');
|
||||
archSpy.mockImplementation(() => os['arch']);
|
||||
execSpy = jest.spyOn(cp, 'execSync');
|
||||
processExitSpy = jest
|
||||
.spyOn(process, 'exit')
|
||||
.mockImplementation((() => {}) as () => never);
|
||||
|
||||
// @actions/tool-cache
|
||||
findSpy = jest.spyOn(tc, 'find');
|
||||
|
||||
Reference in New Issue
Block a user