The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | |
| 3 | import { createAnnotationIdSource } from "./AnnotationIds.ts"; |
| 4 | |
| 5 | describe("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 | }); |