import { createPlayground, Playground } from './'; import * as chai from 'chai'; const expect = chai.expect; describe('Playground', () => { it('createPlayground and destroy', () => { const preCount = document.body.children.length; const playground = createPlayground({ node: document.body }); playground.ready(); expect(playground).to.instanceOf(Playground); expect(document.body.children.length).to.eql(preCount + 1); playground.dispose(); expect(document.body.children.length).to.eql(preCount); }); });