Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeRx committed Nov 14, 2022
1 parent ccfc945 commit 062dd3c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/snaps-cli/src/cmds/init/initHandler.test.ts
Expand Up @@ -185,15 +185,14 @@ describe('initialize', () => {
});

it('fails if the node version is not supported', async () => {
const satisfiesVersionRangeMock = jest
.spyOn(snapUtils, 'satisfiesVersionRange')
.mockImplementation(() => false);
global.process = {
...global.process,
version: 'v15.1.1',
};

await expect(initHandler({ ...getMockArgv() })).rejects.toThrow(
'Init Error: You are using an outdated version of Node (v16.15.1). Please update to Node >=16.',
`Init Error: You are using an outdated version of Node (${process.version}). Please update to Node >=16.`,
);

expect(satisfiesVersionRangeMock).toHaveBeenCalledTimes(1);
});

it('fails if git is not installed', async () => {
Expand Down

0 comments on commit 062dd3c

Please sign in to comment.