Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('render', () => {
controller.render(coord);
expect(controller.annotations).to.have.lengthOf(7);
expect(controller.get(0)).to.be.an.instanceOf(Annotation.Line);
expect(controller.get(1)).to.be.an.instanceOf(Annotation.Image);
expect(controller.get(2)).to.be.an.instanceOf(Annotation.Region);
expect(controller.get(3)).to.be.an.instanceOf(Annotation.Text);
expect(controller.get(4)).to.be.an.instanceOf(Annotation.Html);
expect(controller.get(5)).to.be.an.instanceOf(Annotation.DataRegion);
expect(controller.get(6)).to.be.an.instanceOf(Annotation.DataMarker);
canvas.draw();
expect(controller.frontgroundGroup.get('children')).to.have.lengthOf(3);
expect(controller.backgroundGroup.get('children')).to.have.lengthOf(3);
// html
const dom = document.querySelector('.guide-annotation');
expect(dom).to.be.an.instanceOf(HTMLElement);
});