提交 7d0fd18e 编写于 作者: fxy060608's avatar fxy060608

feat(automator): update

上级 cca287f8
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("jest-environment-node"));const o=new(t(require("./index.js")));module.exports=class extends e{constructor(t,e){super(t),this.launchOptions=t.testEnvironmentOptions}async setup(){await super.setup();const t=global;t.program||(this.launchOptions.platform=this.launchOptions.platform||process.env.UNI_PLATFORM,t.program=await o.launch(this.launchOptions),this.launchOptions.devtools&&this.launchOptions.devtools.remote&&await t.program.remote(!0)),this.global.program=t.program}async teardown(){await super.teardown()}};
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("jest-environment-node"));const s=new(t(require("./index.js")));module.exports=class extends e{constructor(t,e){super(t),process.env.UNI_AUTOMATOR_CONFIG?this.launchOptions=require(process.env.UNI_AUTOMATOR_CONFIG):this.launchOptions=t.testEnvironmentOptions}async setup(){await super.setup();const t=global;t.program||(this.launchOptions.platform=this.launchOptions.platform||process.env.UNI_PLATFORM,t.program=await s.launch(this.launchOptions),this.launchOptions.devtools&&this.launchOptions.devtools.remote&&await t.program.remote(!0)),this.global.program=t.program}async teardown(){await super.teardown()}};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册