From 6b55ec9b7f8762f318fa42bf5f44a3aa4a533e37 Mon Sep 17 00:00:00 2001 From: usetech-llc Date: Wed, 07 Oct 2020 19:57:00 +0000 Subject: [PATCH] Merge pull request #5 from usetech-llc/feature/NFTPAR-90 Feature/nftpar-90 --- --- /dev/null +++ b/tests/src/pallet-presence.test.ts @@ -0,0 +1,25 @@ +import { ApiPromise } from "@polkadot/api"; +import { expect } from "chai"; +import usingApi from "./substrate/substrate-api"; + +function getModuleNames(api: ApiPromise): string[] { + return api.runtimeMetadata.asLatest.modules.map(m => m.name.toString().toLowerCase()); +} + +describe('Pallet presence.', () => { + it('NFT pallet is present.', async () => { + await usingApi(async api => { + expect(getModuleNames(api)).to.include('nft'); + }); + }); + it('Balances pallet is present.', async () => { + await usingApi(async api => { + expect(getModuleNames(api)).to.include('balances'); + }); + }); + it('Contracts pallet is present.', async () => { + await usingApi(async api => { + expect(getModuleNames(api)).to.include('contracts'); + }); + }); +}); -- gitstuff