carlos / todomvc-bakeoff Public

Clone
git clone https://amadan.net/carlos/todomvc-bakeoff

Plain git — no account needed to clone.

Download

Download this file

1# đŸ¤– Behaviour suite
2
3The same tests for every app, run twice: once with JavaScript on
4(`js-on`) and once with it off (`js-off`).
5
6 scripts/test-app.sh <base-url> [results.json]
7
8- `todomvc.spec.ts`: the 29 tests of TodoMVC's own Cypress suite
9 (`tastejs/todomvc/cypress/e2e/spec.cy.js`), ported. Each test gets a
10 fresh browser context, so a fresh cookie and an empty list.
11 Persistence is checked by reloading, and routing uses real paths.
12 With JS off, "save edits on blur" and "cancel edits on escape" are
13 skipped, and editing goes through the edit link.
14- `robustness.spec.ts`: HTML in titles, UTF-8 and `Content-Length`,
15 blank and very long titles, per-visitor isolation and garbled cookies,
16 and cross-site and cross-list POSTs.
17- `visual.spec.ts`: with JS on, the page must match a screenshot of
18 `shared/reference.html` within 2% of pixels, with `footer.info`
19 masked. To regenerate the golden image: `npm run golden`.
20
21Against the reference fixture (2026-10-23): **67 passed, 3 skipped**
22(the two JS-only edit tests and the screenshot test with JS off). Each
23of these deliberate breaks was caught: a 500 on a foreign id, unescaped
24titles, `#/` filter links, untrimmed edits, and no-JS controls visible
25with JS on.
26