123456789101112131415161718import {IKeyringPair} from '@polkadot/types/types';19import {getEventMessage} from '../util/helpers';20import {usingPlaygrounds, expect, itSub} from '../util/playgrounds';212223describe('Burn Item event ', () => {24 let alice: IKeyringPair;25 const checkSection = 'ItemDestroyed';26 const checkTreasury = 'Deposit';27 const checkSystem = 'ExtrinsicSuccess';28 before(async () => {29 await usingPlaygrounds(async (helper, privateKey) => {30 const donor = privateKey('//Alice');31 [alice] = await helper.arrange.createAccounts([10n], donor);32 });33 });34 itSub('Check event from burnItem(): ', async ({helper}) => {35 const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});36 const token = await collection.mintToken(alice, {Substrate: alice.address});37 await token.burn(alice);3839 const msg = JSON.stringify(getEventMessage(helper.chainLog[helper.chainLog.length - 1].events));40 expect(msg).to.be.contain(checkSection);41 expect(msg).to.be.contain(checkTreasury);42 expect(msg).to.be.contain(checkSystem);43 });44});