React Native Detox-运行一个测试

时间:2018-09-06 03:47:08

标签: react-native detox

目前,我使用的环境变量会修改config.js(而不是json ... yup),从而允许运行单个测试。为此有更标准的命令吗?

const single = process.env.single ? `+(${process.env.single}.)+` : "";

module.exports = {
  rootDir: "../",
  setupTestFrameworkScriptFile: "./e2e/init.js",
  preset: "react-native",
  verbose: true,
  transform: {
    "^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
  },
  testMatch: ["**/?(*.)" + single + "(spec|test).js?(x)"]
};

0 个答案:

没有答案