Skip to content

Commit

Permalink
test: add some jest usage
Browse files Browse the repository at this point in the history
  • Loading branch information
suoyuesmile committed Jan 7, 2020
1 parent 2d698aa commit fa67a3b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions jest.config.js
Expand Up @@ -25,7 +25,7 @@ module.exports = {
// collectCoverageFrom: null,

// The directory where Jest should output its coverage files
coverageDirectory: 'tests/coverage'
coverageDirectory: 'tests/coverage',

// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
Expand Down Expand Up @@ -142,10 +142,7 @@ module.exports = {
// testLocationInResults: false,

// The glob patterns Jest uses to detect test files
// testMatch: [
// "**/__tests__/**/*.[jt]s?(x)",
// "**/?(*.)+(spec|test).[tj]s?(x)"
// ],
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)']

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
Expand Down
File renamed without changes.
@@ -1,4 +1,4 @@
import { add, min } from 'math'
import { add, min } from './math.js'
describe('测试math方法', () => {
it('测试加法', () => {
expect(add(1, 3)).toBe(4)
Expand Down
Empty file removed tests/units/demo/api.spec.js
Empty file.

0 comments on commit fa67a3b

Please sign in to comment.