fix: eslint去掉files

This commit is contained in:
万纯 2021-02-02 12:04:51 +08:00
parent 86b1c25764
commit 1e9c8e2952
3 changed files with 3 additions and 7 deletions

View File

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

View File

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

View File

@ -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);