From 2d6bf7c4cd3367a6cecc68bcce5c5044c0022187 Mon Sep 17 00:00:00 2001 From: fanniehuang Date: Tue, 22 Jun 2021 16:37:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(e2e):=20=E4=BF=AE=E5=A4=8D=E5=B0=8F?= =?UTF-8?q?=E9=B9=85=20wxa/core=202.1.4=20mock=E5=9C=A8fecth=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E4=B9=8B=E5=90=8E=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=BD=95=E5=88=B6=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?mock=E4=B8=8D=E5=88=B0fetch=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit re #80 --- packages/wxa-cli/src/tester/e2eTester.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/wxa-cli/src/tester/e2eTester.js b/packages/wxa-cli/src/tester/e2eTester.js index 4d5efa1e..c77231cc 100644 --- a/packages/wxa-cli/src/tester/e2eTester.js +++ b/packages/wxa-cli/src/tester/e2eTester.js @@ -41,10 +41,6 @@ class TesterScheduler extends Schedule { this.perf.markEnd(relativeSrc); - // Inject test suite into app.js - if (dep.meta && dep.meta.source === this.APP_SCRIPT_PATH) { - this.tryWrapWXATestSuite(dep); - } if (dep.meta && dep.meta.source === this.APP_CONFIG_PATH) { this.tryAddGlobalTestComponent(dep); } @@ -52,6 +48,10 @@ class TesterScheduler extends Schedule { // try to wrap wxa every app and page this.tryWrapWXA(dep); this.tryAddPolyfill(dep); + // Inject test suite into app.js + if (dep.meta && dep.meta.source === this.APP_SCRIPT_PATH) { + this.tryWrapWXATestSuite(dep); + } // Todo: conside if cache is necessary here. // debug('dep to process %O', dep);