Open History to see the last commit
1import { describe, expect, it } from "vite-plus/test";
2
3import { createAnnotationIdSource } from "./AnnotationIds.ts";
4
5describe("createAnnotationIdSource", () => {
6 it("gives annotations picked on separate page loads distinct ids", () => {
7 const firstLoad = createAnnotationIdSource();
8 firstLoad("element");
9 const firstAnnotation = firstLoad("annotation");
10
11 const secondLoad = createAnnotationIdSource();
12 secondLoad("element");
13 const secondAnnotation = secondLoad("annotation");
14
15 expect(secondAnnotation).not.toBe(firstAnnotation);
16 });
17});