/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any */ import '../../../dist/zn.min.js'; import { expect, fixture, html } from '@open-wc/testing'; describe('', () => { it('renders a component', async () => { const el = await fixture(html``); expect(el).to.exist; }); it('renders a bar chart with data and categories', async () => { const el: any = await fixture(html` `); await el.updateComplete; await new Promise((r) => setTimeout(r, 50)); const canvas = el.shadowRoot.querySelector('canvas'); expect(canvas).to.exist; }); it('renders a sankey chart', async () => { const el: any = await fixture(html` `); await el.updateComplete; await new Promise((r) => setTimeout(r, 50)); const canvas = el.shadowRoot.querySelector('canvas'); expect(canvas).to.exist; }); it('joins a sync-group when the attribute is set', async () => { const a: any = await fixture(html` `); await a.updateComplete; await new Promise((r) => setTimeout(r, 50)); expect(a.chart?.group).to.equal('g1'); }); });