git.delta.rocks / unique-network / refs/commits / e0d3e40ea06e

difftreelog

Fix tests for quartz and unique: remove global before

Max Andreev2022-09-16parent: #fb3fa28.patch.diff
in: master

2 files changed

modifiedtests/src/adminTransferAndBurn.test.tsdiffbeforeafterboth
--- a/tests/src/adminTransferAndBurn.test.ts
+++ b/tests/src/adminTransferAndBurn.test.ts
@@ -24,19 +24,14 @@
 
 let donor: IKeyringPair;
 
-before(async () => {
-  await usingPlaygrounds(async (_, privateKey) => {
-    donor = privateKey('//Alice');
-  });
-});
-
 describe('Integration Test: ownerCanTransfer allows admins to use only transferFrom/burnFrom:', () => {
   let alice: IKeyringPair;
   let bob: IKeyringPair;
   let charlie: IKeyringPair;
 
   before(async () => {
-    await usingPlaygrounds(async (helper) => {
+    await usingPlaygrounds(async (helper, privateKey) => {
+      donor = privateKey('//Alice');
       [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);
     });
   });
modifiedtests/src/allowLists.test.tsdiffbeforeafterboth
2424
25let donor: IKeyringPair;25let donor: IKeyringPair;
26
27before(async () => {
28 await usingPlaygrounds(async (_, privateKey) => {
29 donor = privateKey('//Alice');
30 });
31});
3226
33let alice: IKeyringPair;27let alice: IKeyringPair;
34let bob: IKeyringPair;28let bob: IKeyringPair;
37describe('Integration Test ext. Allow list tests', () => {31describe('Integration Test ext. Allow list tests', () => {
3832
39 before(async () => {33 before(async () => {
40 await usingPlaygrounds(async (helper) => {34 await usingPlaygrounds(async (helper, privateKey) => {
35 donor = privateKey('//Alice');
41 [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);36 [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
42 });37 });
43 });38 });