difftreelog
NFTPAR-90: Smoke Test: Presence of Pallets.
in: master
1 file changed
tests/src/pallet-presence.test.tsdiffbeforeafterboth1import { ApiPromise } from "@polkadot/api";2import { expect } from "chai";3import usingApi from "./substrate/substrate-api";45function getModuleNames(api: ApiPromise): string[] {6 return api.runtimeMetadata.asLatest.modules.map(m => m.name.toString().toLowerCase());7}89describe('Pallet presence.', () => {10 it('NFT pallet is present.', async () => {11 await usingApi(async api => {12 expect(getModuleNames(api)).to.include('nft');13 });14 });15 it('Balances pallet is present.', async () => {16 await usingApi(async api => {17 expect(getModuleNames(api)).to.include('balances');18 });19 });20 it('Contracts pallet is present.', async () => {21 await usingApi(async api => {22 expect(getModuleNames(api)).to.include('contracts');23 });24 });25});