It lived in scratchpad/, which is untracked, and a tidy-up on 2026-10-22 deleted it — along with the pdf-editor's copy of the same harness. Forty checks of coverage gone, and nothing in the repo so much as mentioned they had existed. Anything load-bearing belongs next to the code it tests. Rebuilt as test/e2e.mjs plus test/e2e-harness.mjs, runnable with `npm run test:e2e`. It boots a throwaway Theseus, opens documents through the sidebar panel, clicks the real ribbon, types with real key events, saves and exports, then reads the result back with the add-on's own reader. The editor carries no test-only hook, so a pass is a pass for what users get. This is the only level that catches breakage which exists solely in the browser — a bundle that will not load as a classic script from file://, webfonts that register and then never fetch, a ribbon button wired to nothing, a PDF on the wrong paper. All four have happened. One trap is recorded in the harness: the throwaway profile must not live under addon-build/, whose package.json declares "type": "module". Node picks a file's module kind from the nearest package.json above it, so an add-on seeded into a profile there is parsed as ESM and dies on its first require() with "require is not defined in ES module scope" — which reads exactly like the add-on being broken, and is not. Run against today's build: 38/38, including the new start-on-first-use activation.
15 lines
441 B
Text
15 lines
441 B
Text
# The patched copy of mammoth is regenerated by `npm run build`; the patches
|
|
# themselves (patches.mjs) are the source of truth and are checked in.
|
|
.patched/
|
|
|
|
# Test scratch — regenerate with test/fixture.mjs and test/roundtrip.mjs.
|
|
test/fixture.docx
|
|
test/roundtrip-out.docx
|
|
test/roundtrip-a.json
|
|
test/roundtrip-b.json
|
|
out/
|
|
|
|
# E2E scratch: a throwaway Theseus profile and its screenshot.
|
|
test/.profile/
|
|
test/e2e-screenshot.png
|
|
test/*.docx
|