diff --git a/hiviewdfx/abilityconstanttest/src/main/js/test/abilityconstant_test.js b/hiviewdfx/abilityconstanttest/src/main/js/test/abilityconstant_test.js index 06606ff0a7ca4260bcf93a891573039d7ab28629..3f4e1c3ff742aa532edf6a6c483a106f5e8c29fe 100755 --- a/hiviewdfx/abilityconstanttest/src/main/js/test/abilityconstant_test.js +++ b/hiviewdfx/abilityconstanttest/src/main/js/test/abilityconstant_test.js @@ -25,6 +25,7 @@ class AbilityTest extends Ability { return AbilityConstant.OnSaveResult.ALL_REJECT } } +let ability_test = new AbilityTest(); export default function ActsAbilityConstantTest() { describe("ActsAbilityConstantTest", function () { @@ -36,7 +37,6 @@ describe("ActsAbilityConstantTest", function () { it("DFX_DFR_AbilityConstant_Interface_0100", 0, function () { console.info("-------------------------DFX_DFR_AbilityConstant_Interface_0100 start-------------------------"); try{ - let ability_test = new AbilityTest(); let StateType = AbilityConstant.StateType.APP_RECOVERY; let wantParam = {"test1": 1, "test2": 2}; let ret = ability_test.onSaveState(StateType, wantParam); diff --git a/hiviewdfx/apprecoverytest/src/main/js/test/apprecovery_test.js b/hiviewdfx/apprecoverytest/src/main/js/test/apprecovery_test.js index 35f71a85ca32a8009bd8ae4031c37db9e355ccc5..d30c1c009a263372ab0f7ddc46a3537fb668bc27 100755 --- a/hiviewdfx/apprecoverytest/src/main/js/test/apprecovery_test.js +++ b/hiviewdfx/apprecoverytest/src/main/js/test/apprecovery_test.js @@ -26,6 +26,7 @@ class AbilityTest extends Ability { return AbilityConstant.OnSaveResult.ALL_REJECT } } +let ability_test = new AbilityTest(); export default function ActsAppRecoveryTest() { describe("ActsAppRecoveryTest", function () { @@ -330,7 +331,6 @@ describe("ActsAppRecoveryTest", function () { it("DFX_DFR_AppRecovery_Interface_1900", 0, function () { console.info("-------------------------DFX_DFR_AppRecovery_Interface_1900 start-------------------------"); try{ - let ability_test = new AbilityTest(); let StateType = AbilityConstant.StateType.APP_RECOVERY; let wantParam = {"test1": 1, "test2": 2}; let ret = ability_test.onSaveState(StateType, wantParam);