Skip to content

Commit

Permalink
Unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
shimkiv committed Oct 23, 2024
1 parent c13588f commit 72d35db
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/lib/project.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,10 @@ describe('project.js', () => {

expect(shell.mkdir).toHaveBeenCalledWith('-p', 'test-project');
expect(shell.cd).toHaveBeenCalledWith('test-project');
expect(spawnSync).toHaveBeenCalledWith(
'npm',
['create', 'svelte@latest', '-y', 'ui'],
{ stdio: 'inherit', shell: true }
);
expect(spawnSync).toHaveBeenCalledWith('npx', ['sv', 'create', 'ui'], {
stdio: 'inherit',
shell: true,
});
expect(shell.cd).toHaveBeenCalledWith('contracts');
checkUiProjectSetup(shell.exec.mock.calls);
checkIfProjectSetupSuccessful();
Expand Down Expand Up @@ -678,11 +677,10 @@ describe('project.js', () => {

scaffoldSvelte();

expect(spawnSync).toHaveBeenCalledWith(
'npm',
['create', 'svelte@latest', '-y', 'ui'],
{ stdio: 'inherit', shell: true }
);
expect(spawnSync).toHaveBeenCalledWith('npx', ['sv', 'create', 'ui'], {
stdio: 'inherit',
shell: true,
});
expect(fs.writeFileSync).toHaveBeenCalled();
});
});
Expand Down

0 comments on commit 72d35db

Please sign in to comment.