git.delta.rocks / unique-network / refs/commits / 1505aad9ef56

difftreelog

test fix pallet presence

Yaroslav Bolyukin2023-03-24parent: #5667e2a.patch.diff
in: master

2 files changed

modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -20,7 +20,6 @@
 const requiredPallets = [
   'balances',
   'common',
-  'randomnesscollectiveflip',
   'timestamp',
   'transactionpayment',
   'treasury',
@@ -98,11 +97,11 @@
   });
 
   itSub('Required pallets are present', ({helper}) => {
-    expect(helper.fetchAllPalletNames()).to.contain.members([...requiredPallets]);
+    expect(helper.fetchAllPalletNames()).to.contain.members([...requiredPallets].sort());
   });
 
   itSub('Governance and consensus pallets are present', ({helper}) => {
-    expect(helper.fetchAllPalletNames()).to.contain.members([...consensusPallets]);
+    expect(helper.fetchAllPalletNames()).to.contain.members([...consensusPallets].sort());
   });
 
   itSub('No extra pallets are included', ({helper}) => {
modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
736736
737 fetchAllPalletNames(): string[] {737 fetchAllPalletNames(): string[] {
738 if(this.api === null) throw Error('API not initialized');738 if(this.api === null) throw Error('API not initialized');
739 return this.api.runtimeMetadata.asLatest.pallets.map(m => m.name.toString().toLowerCase());739 return this.api.runtimeMetadata.asLatest.pallets.map(m => m.name.toString().toLowerCase()).sort();
740 }740 }
741741
742 fetchMissingPalletNames(requiredPallets: string[]): string[] {742 fetchMissingPalletNames(requiredPallets: string[]): string[] {