UNPKG

@panoramax/web-viewer

Version:

Panoramax web viewer for geolocated pictures

19 lines (17 loc) 525 B
import QualityScore from "../../../src/components/ui/QualityScore"; describe("_onInput", () => { it("works", () => { const qs = new QualityScore(); qs.dispatchEvent = jest.fn(); qs.renderRoot.querySelectorAll.mockReturnValueOnce([ { value: 5, checked: false }, { value: 4, checked: true }, { value: 3, checked: false }, { value: 2, checked: true }, { value: 1, checked: false }, ]) qs._onInput(); expect(qs.grade).toEqual("4,2"); expect(qs.dispatchEvent.mock.calls).toMatchSnapshot(); }); });