jest.config.js 1.1 KB
Newer Older
dcloud_wdl's avatar
dcloud_wdl 已提交
1 2 3 4 5 6 7 8
// 自动化测试

// 备注:
//
// 1. testPathIgnorePatterns 忽略/pages/API的几条用例,是因为在ios设备上,运行会导致app崩溃。后期完成后,再去除。
// 2. testPathIgnorePatterns 忽略webview相关用例, 是因为采用app-webview方式后,不需要这两个用例。请勿修改和提交到Git。
//

Y
yurj26 已提交
9
module.exports = {
10
  testTimeout: 30000,
DCloud-WZF's avatar
DCloud-WZF 已提交
11 12 13 14
  reporters: ['default'],
  watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
  moduleFileExtensions: ['js', 'json'],
  rootDir: __dirname,
杜庆泉's avatar
杜庆泉 已提交
15
  testMatch: ["<rootDir>/pages/**/*test.[jt]s?(x)"],
16 17 18 19 20
  testPathIgnorePatterns: [
      '/node_modules/',
      '<rootDir>/pages/API/download-file/download-file.test.js',
      '<rootDir>/pages/API/upload-file/upload-file.test.js',
      '<rootDir>/pages/API/get-battery-info/get-battery-info.test.js',
dcloud_wdl's avatar
dcloud_wdl 已提交
21 22
      '<rootDir>/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js',
      '<rootDir>/pages/webview-screenshot/webview-screenshot.test.js'
23
    ],
DCloud-WZF's avatar
DCloud-WZF 已提交
24
  setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
Y
yurj26 已提交
25
}