difftreelog
test fix pallet presence
in: master
2 files changed
tests/src/pallet-presence.test.tsdiffbeforeafterboth20const requiredPallets = [20const requiredPallets = [21 'balances',21 'balances',22 'common',22 'common',23 'randomnesscollectiveflip',24 'timestamp',23 'timestamp',25 'transactionpayment',24 'transactionpayment',26 'treasury',25 'treasury',98 });97 });9998100 itSub('Required pallets are present', ({helper}) => {99 itSub('Required pallets are present', ({helper}) => {101 expect(helper.fetchAllPalletNames()).to.contain.members([...requiredPallets]);100 expect(helper.fetchAllPalletNames()).to.contain.members([...requiredPallets].sort());102 });101 });103102104 itSub('Governance and consensus pallets are present', ({helper}) => {103 itSub('Governance and consensus pallets are present', ({helper}) => {105 expect(helper.fetchAllPalletNames()).to.contain.members([...consensusPallets]);104 expect(helper.fetchAllPalletNames()).to.contain.members([...consensusPallets].sort());106 });105 });107106108 itSub('No extra pallets are included', ({helper}) => {107 itSub('No extra pallets are included', ({helper}) => {tests/src/util/playgrounds/unique.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -736,7 +736,7 @@
fetchAllPalletNames(): string[] {
if(this.api === null) throw Error('API not initialized');
- return this.api.runtimeMetadata.asLatest.pallets.map(m => m.name.toString().toLowerCase());
+ return this.api.runtimeMetadata.asLatest.pallets.map(m => m.name.toString().toLowerCase()).sort();
}
fetchMissingPalletNames(requiredPallets: string[]): string[] {