test: added e2e test, improved unit test

This commit is contained in:
Jacob Parish 2024-02-06 09:46:03 -06:00
parent c73bf9098a
commit 0c618ceb2e
2 changed files with 40 additions and 2 deletions

View file

@ -277,13 +277,13 @@ describe('main tests', () => {
it('should not enable corepack when no input', async () => {
inputs['corepack'] = '';
await main.run();
expect(getCommandOutputSpy).not.toHaveBeenCalledWith('corepack');
expect(getCommandOutputSpy).not.toHaveBeenCalledWith(expect.stringContaining('corepack'));
});
it('should not enable corepack when input is "false"', async () => {
inputs['corepack'] = 'false';
await main.run();
expect(getCommandOutputSpy).not.toHaveBeenCalledWith('corepack');
expect(getCommandOutputSpy).not.toHaveBeenCalledWith(expect.stringContaining('corepack'));
});
it('should enable corepack when input is "true"', async () => {