mirror of
https://github.com/actions/setup-node.git
synced 2025-06-28 13:43:48 +00:00
Merge 7d1c5630d8
into 08f58d1471
This commit is contained in:
commit
7125aebe2f
7 changed files with 35 additions and 0 deletions
|
@ -38,6 +38,8 @@ describe('main tests', () => {
|
|||
|
||||
let setupNodeJsSpy: jest.SpyInstance;
|
||||
|
||||
let processExitSpy: jest.SpyInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
inputs = {};
|
||||
|
||||
|
@ -76,6 +78,10 @@ describe('main tests', () => {
|
|||
|
||||
setupNodeJsSpy = jest.spyOn(OfficialBuilds.prototype, 'setupNodeJs');
|
||||
setupNodeJsSpy.mockImplementation(() => {});
|
||||
|
||||
processExitSpy = jest
|
||||
.spyOn(process, 'exit')
|
||||
.mockImplementation((() => {}) as () => never);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -237,6 +243,12 @@ describe('main tests', () => {
|
|||
`::error::The specified node version file at: ${versionFilePath} does not exist${osm.EOL}`
|
||||
);
|
||||
});
|
||||
|
||||
it('should call process.exit() explicitly after running', async () => {
|
||||
await main.run();
|
||||
|
||||
expect(processExitSpy).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('cache on GHES', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue