difftreelog
fix reset sudo after elect sudo test
in: master
1 file changed
js-packages/tests/sub/governance/electsudo.test.tsdiffbeforeafterboth32 const [newAccount] = await helper.arrange.createAccounts([1000n], donor);32 const [newAccount] = await helper.arrange.createAccounts([1000n], donor);33 const newSudoKey = newAccount.address;33 const newSudoKey = newAccount.address;3435 // Have to use `afterEach` here instead of `after` to ensure it will be executed before `describe.after`.36 afterEach(async () => {37 // For some reason, the outer helper API is not initialized inside `afterEach`.38 await usingPlaygrounds(async (helper) => {39 await helper.executeExtrinsic(40 newAccount,41 'api.tx.sudo.setKey',42 [sudoer.address],43 false,44 );45 });46 });344735 const democracyProposal = helper.constructApiCall('api.tx.utility.dispatchAs', [48 const democracyProposal = helper.constructApiCall('api.tx.utility.dispatchAs', [36 {49 {83 .then(k => k.toString());96 .then(k => k.toString());84 expect(currentSudoKey).to.be.equal(newSudoKey);97 expect(currentSudoKey).to.be.equal(newSudoKey);8586 await helper.executeExtrinsic(newAccount, 'api.tx.sudo.setKey', [sudoer.address]);87 });98 });88});99});89100