From ad6a8cda9a27316a0514919aa4617aed2f4ed9b1 Mon Sep 17 00:00:00 2001 From: Pim Date: Wed, 13 Feb 2019 10:16:51 +0100 Subject: [PATCH] test: mock enquirer in typescript tests (#5025) --- packages/typescript/test/setup.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/typescript/test/setup.test.js b/packages/typescript/test/setup.test.js index 54b0614274..3646048f49 100644 --- a/packages/typescript/test/setup.test.js +++ b/packages/typescript/test/setup.test.js @@ -4,6 +4,9 @@ import { register } from 'ts-node' import { setup as setupTypeScript } from '@nuxt/typescript' jest.mock('ts-node') +jest.mock('enquirer', () => ({ + prompt: jest.fn(() => ({ confirmGeneration: true })) +})) describe('typescript setup', () => { const rootDir = 'tmp'