4.2: the ADF property

This commit is contained in:
2026-09-14 21:26:36 +02:00
parent 507f68aa13
commit e166e969cb
6 changed files with 203 additions and 14 deletions
-12
View File
@@ -107,18 +107,6 @@ function roundTripFixtures(): { name: string; path: string }[] {
)
}
test('no two round-trip documents share one markdown spelling', () => {
const spellings = new Map<string, string>()
for (const fixture of roundTripFixtures()) {
const parsed: unknown = JSON.parse(readFileSync(fixture.path, 'utf8'))
assert.ok(isAdfDocument(parsed), `${fixture.name} is not an ADF document`)
const result = adfToMarkdown(parsed)
assert.ok(result.ok, result.ok ? '' : `${result.error.code}: ${result.error.message}`)
assert.equal(spellings.get(result.value), undefined, `${fixture.name} and ${spellings.get(result.value)} share one markdown spelling`)
spellings.set(result.value, fixture.name)
}
})
test('no round-trip fixture repeats the document another holds', () => {
const documents = new Map<string, string>()
for (const fixture of roundTripFixtures()) {