test: mock enquirer in typescript tests (#5025)

This commit is contained in:
Pim 2019-02-13 10:16:51 +01:00 committed by Xin Du (Clark)
parent 9be8861b81
commit ad6a8cda9a

View File

@ -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'