From a2f9704c1eafee2a5cc34b58fa16c338f6fe82b9 Mon Sep 17 00:00:00 2001 From: huangke11 Date: Thu, 10 Feb 2022 10:16:59 +0800 Subject: [PATCH] add cust js api test Signed-off-by: huangke11 --- global/cust/custjs/Test.json | 19 +++++++++++-------- .../src/main/js/default/test/Cust.test.js | 5 +++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/global/cust/custjs/Test.json b/global/cust/custjs/Test.json index c52a89133..05512e3fd 100755 --- a/global/cust/custjs/Test.json +++ b/global/cust/custjs/Test.json @@ -13,14 +13,17 @@ ], "type": "AppInstallKit", "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "mkdir -p /system/etc/custxml/", + "mkdir -p /sys-prod/etc/custxml/", + "touch /system/etc/custxml/system.xml", + "touch /system/etc/custxml/both.xml", + "touch /sys-prod/etc/custxml/both.xml", + "touch /sys-prod/etc/custxml/user.xml" + ] } - "run-command": [ - "mkdir -p /system/etc/custxml/", - "mkdir -p /sys-prod/etc/custxml/", - "touch /system/etc/custxml/system.xml", - "touch /system/etc/custxml/both.xml", - "touch /sys-prod/etc/custxml/both.xml", - "touch /sys-prod/etc/custxml/user.xml" - ] ] } diff --git a/global/cust/custjs/src/main/js/default/test/Cust.test.js b/global/cust/custjs/src/main/js/default/test/Cust.test.js index 3dff34d5c..26a726ca5 100755 --- a/global/cust/custjs/src/main/js/default/test/Cust.test.js +++ b/global/cust/custjs/src/main/js/default/test/Cust.test.js @@ -12,8 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import cust from '@ohos.cust' + import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' +import cust from '@ohos.cust' describe('CustTest', function () { console.log('CustTest**************************start'); @@ -145,4 +146,4 @@ describe('CustTest', function () { }) console.log('CustTest**************************end'); -}) \ No newline at end of file +}) -- GitLab