diff --git a/packages/create-app/src/lib/tasks.test.ts b/packages/create-app/src/lib/tasks.test.ts index 6a312436bf..d2efe81b90 100644 --- a/packages/create-app/src/lib/tasks.test.ts +++ b/packages/create-app/src/lib/tasks.test.ts @@ -19,6 +19,7 @@ import mockFs from 'mock-fs'; import child_process from 'child_process'; import path from 'path'; import { + Task, buildAppTask, checkAppExistsTask, checkPathExistsTask, @@ -27,6 +28,13 @@ import { templatingTask, } from './tasks'; +jest.spyOn(Task, 'log').mockReturnValue(undefined); +jest.spyOn(Task, 'error').mockReturnValue(undefined); +jest.spyOn(Task, 'section').mockReturnValue(undefined); +jest + .spyOn(Task, 'forItem') + .mockImplementation((_a, _b, taskFunc) => taskFunc()); + jest.mock('child_process'); // By mocking this the filesystem mocks won't mess with reading all of the package.jsons