diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 1b2a2b04d..000000000 --- a/jest.config.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'], - transform: { - '\\.(vue)$': 'vue-jest', - '\\.(js|jsx|ts|tsx)$': '/test/transformer.js', - }, - snapshotSerializers: ['jest-serializer-vue'], - collectCoverageFrom: [ - 'src/**/*.{js,jsx,ts,tsx,vue}', - '!**/style/**', - '!**/demo/**', - '!**/locale/lang/**', - '!**/sku/**' - ], - collectCoverage: true, - coverageReporters: ['html', 'lcov', 'text-summary'], - coverageDirectory: './test/coverage' -}; diff --git a/packages/vant-cli/src/commands/test.ts b/packages/vant-cli/src/commands/jest.ts similarity index 100% rename from packages/vant-cli/src/commands/test.ts rename to packages/vant-cli/src/commands/jest.ts diff --git a/packages/vant-cli/src/index.ts b/packages/vant-cli/src/index.ts index d122c18ab..7bff3b0b8 100755 --- a/packages/vant-cli/src/index.ts +++ b/packages/vant-cli/src/index.ts @@ -2,8 +2,8 @@ import { command, parse } from 'commander'; import { dev } from './commands/dev'; -import { test } from './commands/test'; import { lint } from './commands/lint'; +import { test } from './commands/jest'; import { clean } from './commands/clean'; import { build } from './commands/build'; import { release } from './commands/release'; diff --git a/test/transformer.js b/test/transformer.js deleted file mode 100644 index d49d40348..000000000 --- a/test/transformer.js +++ /dev/null @@ -1,3 +0,0 @@ -const babelConfig = require('../babel.config'); - -module.exports = require('babel-jest').createTransformer(babelConfig);