Skip to content

Commit d3ca9b3

Browse files
author
fanniehuang
committed
feat(e2e): suport comments in json
re #80
1 parent 2bb3d3a commit d3ca9b3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/wxa-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wxa-cli2-apple",
3-
"version": "1.0.25",
3+
"version": "1.0.26",
44
"description": "cli for wxa development",
55
"main": "dist/wxa.js",
66
"scripts": {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import crypto from 'crypto';
1212
import debugPKG from 'debug';
1313
import path from 'path';
1414
import runTestCase from './wxa-e2eTest/runTestcase.js'
15-
15+
import JSON5 from 'json5'
1616
const debug = debugPKG('WXA:E2ETester');
1717
const E2E_TEST_COMPONENT = 'wxa-e2e-record-btn';
1818
const E2E_TEST_URL = '/record';
@@ -121,7 +121,7 @@ class TesterScheduler extends Schedule {
121121

122122
tryAddGlobalTestComponent(mdl) {
123123
try {
124-
let appConfigs = JSON.parse(mdl.content);
124+
let appConfigs = JSON5.parse(mdl.content);
125125

126126
appConfigs['wxa.globalComponents'] = {
127127
...appConfigs['wxa.globalComponents'],

0 commit comments

Comments
 (0)