diff --git a/packages/git-sync/test/stabilize.test.ts b/packages/git-sync/test/stabilize.test.ts index d5303e9f..c781546e 100644 --- a/packages/git-sync/test/stabilize.test.ts +++ b/packages/git-sync/test/stabilize.test.ts @@ -55,10 +55,15 @@ describe('stabilizePageFile โ€” normalize-on-write fixpoint (SPEC ยง11)', () => const file2 = await stabilizePageFile(doc2, meta); expect(file2).toBe(file1); - // The materialized diagram default is present in the stabilized body (proof - // that the convergence pass actually ran, not just that two naive exports - // happened to match). - expect(body1).toContain('data-align="center"'); + // The drawio node was materialized to its canonical HTML form by the + // convergence pass โ€” a bare `{ src }` doc node becomes the full + // `
` โ€” proof the pass actually ran, not + // just two naive exports happening to match. Assert on the stable canonical + // markers rather than `data-align="center"`: center is a schema default the + // converter may omit (see prosemirror-markdown media-html.ts), so it is not + // a reliable convergence proof. + expect(body1).toContain('data-type="drawio"'); + expect(body1).toContain('data-src="/d.drawio"'); }); it('already-stable content is unchanged by the pass (idempotent)', async () => {