mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-10 14:11:11 +00:00
Test output
This commit is contained in:
parent
2a814b57e1
commit
8ba370a949
2 changed files with 35 additions and 11 deletions
|
@ -41,6 +41,7 @@ describe('setup-node', () => {
|
|||
let parseNodeVersionSpy: jest.SpyInstance;
|
||||
let isCacheActionAvailable: jest.SpyInstance;
|
||||
let getExecOutputSpy: jest.SpyInstance;
|
||||
let execExecSpy: jest.SpyInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
// @actions/core
|
||||
|
@ -57,6 +58,7 @@ describe('setup-node', () => {
|
|||
archSpy = jest.spyOn(osm, 'arch');
|
||||
archSpy.mockImplementation(() => os['arch']);
|
||||
execSpy = jest.spyOn(cp, 'execSync');
|
||||
execExecSpy = jest.spyOn(exec, 'exec');
|
||||
|
||||
// @actions/tool-cache
|
||||
findSpy = jest.spyOn(tc, 'find');
|
||||
|
@ -249,6 +251,10 @@ describe('setup-node', () => {
|
|||
|
||||
let expPath = path.join(toolPath, 'bin');
|
||||
|
||||
expect(execExecSpy).toHaveBeenCalledWith('node', ['--version']);
|
||||
expect(execExecSpy).toHaveBeenCalledWith('npm', ['--version'], expect.anything());
|
||||
expect(execExecSpy).toHaveBeenCalledWith('yarn', ['--version'], expect.anything());
|
||||
|
||||
expect(dlSpy).toHaveBeenCalled();
|
||||
expect(exSpy).toHaveBeenCalled();
|
||||
expect(logSpy).toHaveBeenCalledWith(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue