Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
//
// qmd -> pampa AST -> astToDoc -> docToMarkdown -> pampa AST -> compare
//
// Skips when native pampa can't be built (Rust-less CI). Run locally:
// cd ts-packages/preview-renderer && npx vitest run src/q2-preview/richtext/
// DISABLED BY DEFAULT (bd-d8nol0xn): shells out to the native `pampa` binary via
// the test-utils oracle (slow, and intermittently flaky under the parallel load of
// a full `vitest run` / `cargo xtask verify`). This is a fidelity oracle, not a
// routine gate. Opt in (and only runs when native pampa is buildable):
// QUARTO_RUN_PAMPA_ROUNDTRIP=1 npx vitest run src/q2-preview/richtext/roundtrip.test.ts
// (from ts-packages/preview-renderer).

import { describe, it, expect } from 'vitest';
import { astToDoc } from './astToProseMirror';
Expand Down Expand Up @@ -34,7 +38,7 @@ const FIXTURES: { name: string; qmd: string }[] = [
// nodes. Byte-exact round-tripping is a nice-to-have, not required (cosmetic
// reformatting like `***x***` -> `**_x_**`, or `-` -> `*` bullets, is acceptable);
// we log it for visibility but do not fail on it.
describe.skipIf(!pampaAvailable())('rich-text bridge round-trip', () => {
describe.skipIf(!process.env.QUARTO_RUN_PAMPA_ROUNDTRIP || !pampaAvailable())('rich-text bridge round-trip', () => {
for (const fx of FIXTURES) {
it(`preserves semantics: ${fx.name}`, () => {
const astIn = parseUntransformed(fx.qmd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
// Bucket each fixture: exact / equivalent (reformatted) / broken. Prints a findings
// table. See claude-notes/plans/2026-06-23-tiptap-rich-text-block-editor.md.
//
// Run: npx vitest run src/q2-preview/tiptap-roundtrip-spike/roundtrip.test.ts
// DISABLED BY DEFAULT (bd-d8nol0xn): this is a measurement spike, not a routine
// gate, and it shells out to the native `pampa` binary (build + per-fixture
// subprocess over temp files) — slow, and intermittently flaky under the parallel
// load of a full `vitest run` / `cargo xtask verify`. Opt in to run it:
// QUARTO_RUN_PAMPA_ROUNDTRIP=1 npx vitest run src/q2-preview/tiptap-roundtrip-spike/roundtrip.test.ts
// (from ts-packages/preview-renderer). Requires a buildable native `pampa`.

import { writeFileSync } from 'node:fs';
Expand Down Expand Up @@ -43,7 +47,7 @@ function roundtrip(qmd: string): { row: Omit<Row, 'name'>; } {
return { row: { verdict, chips: chips.length, unknown, mdOut } };
}

describe('tiptap markdown round-trip spike', () => {
describe.skipIf(!process.env.QUARTO_RUN_PAMPA_ROUNDTRIP)('tiptap markdown round-trip spike', () => {
const rows: Row[] = [];

for (const fx of FIXTURES) {
Expand Down
Loading