Skip to content

Commit 2d6bf7c

Browse files
author
fanniehuang
committed
fix(e2e): 修复小鹅 wxa/core 2.1.4 mock在fecth定义之后的问题,导致录制的时候mock不到fetch请求
re #80
1 parent 8543004 commit 2d6bf7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/wxa-cli/src/tester/e2eTester.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ class TesterScheduler extends Schedule {
4141

4242
this.perf.markEnd(relativeSrc);
4343

44-
// Inject test suite into app.js
45-
if (dep.meta && dep.meta.source === this.APP_SCRIPT_PATH) {
46-
this.tryWrapWXATestSuite(dep);
47-
}
4844
if (dep.meta && dep.meta.source === this.APP_CONFIG_PATH) {
4945
this.tryAddGlobalTestComponent(dep);
5046
}
5147

5248
// try to wrap wxa every app and page
5349
this.tryWrapWXA(dep);
5450
this.tryAddPolyfill(dep);
51+
// Inject test suite into app.js
52+
if (dep.meta && dep.meta.source === this.APP_SCRIPT_PATH) {
53+
this.tryWrapWXATestSuite(dep);
54+
}
5555

5656
// Todo: conside if cache is necessary here.
5757
// debug('dep to process %O', dep);

0 commit comments

Comments
 (0)