difftreelog
tests: remove dependency on execution order
in: master
1 file changed
tests/src/removeFromWhiteList.test.tsdiffbeforeafterboth21describe('Integration Test removeFromWhiteList', () => {21describe('Integration Test removeFromWhiteList', () => {22 let alice: IKeyringPair;22 let alice: IKeyringPair;23 let bob: IKeyringPair;23 let bob: IKeyringPair;24 let collectionId: number;252426 before(async () => {25 before(async () => {27 await usingApi(async (api) => {26 await usingApi(async (api) => {28 alice = privateKey('//Alice');27 alice = privateKey('//Alice');29 bob = privateKey('//Bob');28 bob = privateKey('//Bob');30 collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });31 await enableWhiteListExpectSuccess(alice, collectionId);32 await addToWhiteListExpectSuccess(alice, collectionId, bob.address);33 });29 });34 });30 });353136 it('remove bob from whitelist', async () => {32 it('ensure bob is not in whitelist after removal', async () => {37 await usingApi(async () => {33 await usingApi(async () => {34 const collectionId = await createCollectionExpectSuccess({ mode: { type: 'NFT' } });35 await enableWhiteListExpectSuccess(alice, collectionId);36 await addToWhiteListExpectSuccess(alice, collectionId, bob.address);3738 await removeFromWhiteListExpectSuccess(alice, collectionId, bob.address);38 await removeFromWhiteListExpectSuccess(alice, collectionId, bob.address);39 expect(await isWhitelisted(collectionId, bob.address)).to.be.false;39 });40 });40 });41 });4142 it('ensure bob is no longer in whitelist', async () => {43 expect(await isWhitelisted(collectionId, bob.address)).to.be.false;44 });454246 it('allows removal from collection with unset whitelist status', async () => {43 it('allows removal from collection with unset whitelist status', async () => {47 await usingApi(async () => {44 await usingApi(async () => {