1234567891011121314151617import {expect} from 'chai';18import {itSub, usingPlaygrounds} from './util/playgrounds';192021const requiredPallets = [22 'balances',23 'common',24 'randomnesscollectiveflip',25 'timestamp',26 'transactionpayment',27 'treasury',28 'structure',29 'system',30 'vesting',31 'parachainsystem',32 'parachaininfo',33 'evm',34 'evmcodersubstrate',35 'evmcontracthelpers',36 'evmmigration',37 'evmtransactionpayment',38 'ethereum',39 'fungible',40 'xcmpqueue',41 'polkadotxcm',42 'cumulusxcm',43 'dmpqueue',44 'inflation',45 'unique',46 'nonfungible',47 'charging',48 'configuration',49];505152const consensusPallets = [53 'sudo',54 'aura',55 'auraext',56];5758describe('Pallet presence', () => {59 before(async () => {60 await usingPlaygrounds(async helper => {61 const chain = await helper.api!.rpc.system.chain();6263 const refungible = 'refungible';64 const scheduler = 'scheduler';65 const rmrkPallets = ['rmrkcore', 'rmrkequip'];66 const appPromotion = 'apppromotion';6768 if (chain.eq('OPAL by UNIQUE')) {69 requiredPallets.push(refungible, scheduler, appPromotion, ...rmrkPallets);70 } else if (chain.eq('QUARTZ by UNIQUE')) {71 72 } else if (chain.eq('UNIQUE')) {73 74 }75 });76 });7778 itSub('Required pallets are present', async ({helper}) => {79 expect(helper.fetchAllPalletNames()).to.contain.members([...requiredPallets]);80 });8182 itSub('Governance and consensus pallets are present', async ({helper}) => {83 expect(helper.fetchAllPalletNames()).to.contain.members([...consensusPallets]);84 });8586 itSub('No extra pallets are included', async ({helper}) => {87 expect(helper.fetchAllPalletNames().sort()).to.be.deep.equal([...requiredPallets, ...consensusPallets].sort());88 });89});