diff --git a/packages/fes-plugin-unit-jest/src/index.js b/packages/fes-plugin-unit-jest/src/index.js index 27d79816..e5b80b8d 100644 --- a/packages/fes-plugin-unit-jest/src/index.js +++ b/packages/fes-plugin-unit-jest/src/index.js @@ -6,7 +6,7 @@ import { Logger } from '@webank/fes-compiler'; import { options as CliOptions } from 'jest-cli/build/cli/args'; import createDefaultConfig from './createDefaultConfig'; -const logger = new Logger('fes:plugin-built-in'); +const logger = new Logger('fes:plugin-unit-jest'); export default function (api) { const { utils: { mergeConfig }, cwd } = api; @@ -16,7 +16,7 @@ export default function (api) { description: 'run unit tests with jest', options: { '--watch': 'run tests in watch mode', - '--debug': 'debug' + '--debug': 'print debug logs' }, async fn({ args }) { process.env.NODE_ENV = 'test'; diff --git a/packages/fes-template/.eslintrc.js b/packages/fes-template/.eslintrc.js index 57c7f909..7d04898c 100644 --- a/packages/fes-template/.eslintrc.js +++ b/packages/fes-template/.eslintrc.js @@ -1,9 +1,5 @@ module.exports = { extends: [require.resolve('@webank/eslint-config-webank')], - files: [ - '**/__tests__/*.{j,t}s?(x)', - '**/tests/unit/**/*.spec.{j,t}s?(x)' - ], env: { jest: true } diff --git a/packages/fes-template/__tests__/add.js b/packages/fes-template/__tests__/add.js index 5eaa2245..d5c874a0 100644 --- a/packages/fes-template/__tests__/add.js +++ b/packages/fes-template/__tests__/add.js @@ -1,4 +1,4 @@ -import sum from "@/utils/sum" +import sum from '@/utils/sum'; test('adds 1 + 2 to equal 3', () => { expect(sum(1, 2)).toBe(3);