git.delta.rocks / unique-network / refs/commits / fa2ebd30e96a

difftreelog

NFTPAR-90: Smoke Test: Presence of Pallets.

sotmorskiy2020-09-24parent: #8d30d14.patch.diff
in: master

1 file changed

addedtests/src/pallet-presence.test.tsdiffbeforeafterboth
after · tests/src/pallet-presence.test.ts
1import { 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});