From 526d67243bb8e15568fbf7d207d0d66d84f676fd Mon Sep 17 00:00:00 2001 From: zhaimengchao Date: Fri, 31 Mar 2023 15:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90account=E3=80=91=E3=80=90master?= =?UTF-8?q?=E3=80=91=E7=94=A8=E4=BE=8B=E6=97=B6=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaimengchao --- .../main/js/test/Getaccountsbyowner.test.js | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js b/account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js index f17849446..f2f8ee72e 100644 --- a/account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js +++ b/account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js @@ -21,26 +21,26 @@ const LENGTHLIMIT = 1024; const SELFBUNDLE = 'com.example.actsgetaccountsbyowner' const createAccountOptions = {customData:{age:'12'}} export default function GetAccountsByOwner() { - beforeAll(async function (done) { - console.debug("====>startAbility first start===="); - await featureAbility.startAbility( - { - want: + describe('GetAccountsByOwner', function () { + beforeAll(async function (done) { + console.debug("====>startAbility start===="); + await featureAbility.startAbility( { - deviceId: "", - bundleName: "com.example.actsscenegetallaccounts", - abilityName: "com.example.actsscenegetallaccounts.MainAbility", - action: "action1", - parameters: - {}, + want: + { + deviceId: "", + bundleName: "com.example.actsscenegetallaccounts", + abilityName: "com.example.actsscenegetallaccounts.MainAbility", + action: "action1", + parameters: + {}, + }, }, - }, - ); - sleep(TIMEOUT); - done(); - }); + ); + await sleep(TIMEOUT); + done(); + }); - describe('GetAccountsByOwner', function () { async function sleep(delay) { let timeoutId = null; var promise = new Promise((resolve, reject) => { @@ -315,7 +315,7 @@ export default function GetAccountsByOwner() { console.debug("====>creat finish===="); console.debug("====>add account 1000 start===="); await appAccountManager.createAccount("Account_application_promise"); - sleep(TIMEOUT) + await sleep(TIMEOUT) console.debug("====>getAccountsByOwner 1000 start===="); try{ var data = await appAccountManager.getAccountsByOwner(SELFBUNDLE); @@ -361,7 +361,7 @@ export default function GetAccountsByOwner() { console.debug("====>GetAccountsByOwner_1100 end===="); done(); } - sleep(TIMEOUT) + await sleep(TIMEOUT) console.debug("====>getAccountsByOwner 1100 start===="); appAccountManager.getAccountsByOwner(specifiedBundle, getAllCallback); }); -- GitLab