mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-11 02:29:21 -05:00
fix(typescript): tsconfig whitespace (#2046)
This commit is contained in:
@@ -110,10 +110,11 @@ test('tsconfig.json should be valid json', async () => {
|
||||
expect(() => {
|
||||
JSON.parse(files['tsconfig.json'])
|
||||
}).not.toThrow()
|
||||
expect(files['tsconfig.json']).not.toMatch('" ')
|
||||
})
|
||||
|
||||
test('compat with unit-mocha', async () => {
|
||||
const { pkg } = await generateWithPlugin([
|
||||
const { pkg, files } = await generateWithPlugin([
|
||||
{
|
||||
id: '@vue/cli-plugin-unit-mocha',
|
||||
apply: require('@vue/cli-plugin-unit-mocha/generator'),
|
||||
@@ -131,10 +132,12 @@ test('compat with unit-mocha', async () => {
|
||||
|
||||
expect(pkg.devDependencies).toHaveProperty('@types/mocha')
|
||||
expect(pkg.devDependencies).toHaveProperty('@types/chai')
|
||||
|
||||
expect(files['tsconfig.json']).not.toMatch('" ')
|
||||
})
|
||||
|
||||
test('compat with unit-jest', async () => {
|
||||
const { pkg } = await generateWithPlugin([
|
||||
const { pkg, files } = await generateWithPlugin([
|
||||
{
|
||||
id: '@vue/cli-plugin-unit-jest',
|
||||
apply: require('@vue/cli-plugin-unit-jest/generator'),
|
||||
@@ -151,4 +154,6 @@ test('compat with unit-jest', async () => {
|
||||
])
|
||||
|
||||
expect(pkg.devDependencies).toHaveProperty('@types/jest')
|
||||
|
||||
expect(files['tsconfig.json']).not.toMatch('" ')
|
||||
})
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"types": [
|
||||
"node"<%_ if (hasMocha) { _%>,
|
||||
"node"<% if (hasMocha || hasJest) { %>,<% } %>
|
||||
<%_ if (hasMocha) { _%>
|
||||
"mocha",
|
||||
"chai"
|
||||
<%_ } else if (hasJest) { _%>,
|
||||
<%_ } else if (hasJest) { _%>
|
||||
"jest"
|
||||
<%_ } _%>
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user