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