style: format with prettier
This commit is contained in:
@@ -7,12 +7,12 @@ describe('printCommandSummary', () => {
|
||||
it('should print the command summary without errors', () => {
|
||||
// Mock console.log to capture output
|
||||
const logSpy = jest.spyOn(console, 'log').mockImplementation(() => {});
|
||||
|
||||
|
||||
printCommandSummary();
|
||||
|
||||
|
||||
// Check that console.log was called
|
||||
expect(logSpy).toHaveBeenCalled();
|
||||
|
||||
|
||||
// Restore console.log
|
||||
logSpy.mockRestore();
|
||||
});
|
||||
|
||||
@@ -7,12 +7,17 @@ jest.mock('child_process');
|
||||
|
||||
describe('installDependencies', () => {
|
||||
it('should install dependencies without errors', () => {
|
||||
const execSyncMock = jest.spyOn(child_process, 'execSync').mockImplementation(() => {});
|
||||
|
||||
const execSyncMock = jest
|
||||
.spyOn(child_process, 'execSync')
|
||||
.mockImplementation(() => {});
|
||||
|
||||
installDependencies();
|
||||
|
||||
expect(execSyncMock).toHaveBeenCalledWith(expect.stringContaining('npm install'), expect.anything());
|
||||
|
||||
|
||||
expect(execSyncMock).toHaveBeenCalledWith(
|
||||
expect.stringContaining('npm install'),
|
||||
expect.anything()
|
||||
);
|
||||
|
||||
execSyncMock.mockRestore();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user