From aa6054c408a420e869acb78b59b422ff7664f87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=AC=A2=E6=AC=A2?= Date: Tue, 22 Aug 2023 11:15:02 +0000 Subject: [PATCH] update ibleRegisterState.test.js. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 姜欢欢 --- .../ohosTest/js/test/AccessibleRegisterState.test.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/barrierfree/accessibleregisterstate/entry/src/ohosTest/js/test/AccessibleRegisterState.test.js b/barrierfree/accessibleregisterstate/entry/src/ohosTest/js/test/AccessibleRegisterState.test.js index 3eb146ec3..bb2eef2d0 100644 --- a/barrierfree/accessibleregisterstate/entry/src/ohosTest/js/test/AccessibleRegisterState.test.js +++ b/barrierfree/accessibleregisterstate/entry/src/ohosTest/js/test/AccessibleRegisterState.test.js @@ -35,7 +35,6 @@ describe('AccessibleRegisterState', function () { /******************************************************************************** */ /* Cases RegisterStateOnOff_0330-0360 are for accessibility.on() API test */ /******************************************************************************** */ - /* * @tc.number RegisterStateOnOff_0330 * @tc.name RegisterStateOnOff_0330 @@ -47,8 +46,9 @@ describe('AccessibleRegisterState', function () { it('RegisterStateOnOff_0330', 0, async function (done) { console.info('RegisterStateOnOff_0330'); let stateEventType = 'accessibilityStateChange'; - accessibility.on(stateEventType, (data) => {}); - accessibility.off(stateEventType, (data) => {}); + let callbackdata = (data) => {} + accessibility.on(stateEventType, callbackdata); + accessibility.off(stateEventType, callbackdata); expect(true).assertTrue(); done(); }) @@ -64,8 +64,9 @@ describe('AccessibleRegisterState', function () { it('RegisterStateOnOff_0340', 0, async function (done) { console.info('RegisterStateOnOff_0340'); let stateEventType = 'touchGuideStateChange'; - accessibility.on(stateEventType, (data) => {}); - accessibility.off(stateEventType, (data) => {}); + let callbackdata = (data) => {} + accessibility.on(stateEventType, callbackdata); + accessibility.off(stateEventType, callbackdata); expect(true).assertTrue(); done(); }) -- GitLab