Write the same plain markdown for documents the editor holds equal: normalize the reduction's input again, naming a refusal by the caller's document
This commit is contained in:
@@ -8,6 +8,7 @@ import { adfToMarkdown } from '../markdown/emit/adf-to-markdown.ts'
|
||||
import { adfToPlainMarkdown, reduceToPlain } from '../markdown/emit/plain-reduction.ts'
|
||||
import { directivePrefix } from '../markdown/directive-syntax.ts'
|
||||
import { markdownToAdf, plainMarkdownToAdf } from '../markdown/parse/markdown-to-adf.ts'
|
||||
import { toEditorNormal } from '../adf/editor-normal.ts'
|
||||
|
||||
const gateRuns = 1600
|
||||
const renamedPrefix = '!adg:'
|
||||
@@ -61,3 +62,12 @@ test('a generated document writes plain markdown refusing only what the guard re
|
||||
propertyRuns(gateRuns),
|
||||
)
|
||||
})
|
||||
|
||||
test('a generated document writes the plain markdown its editor-normal form writes', { timeout: propertyTimeout }, () => {
|
||||
fc.assert(
|
||||
fc.property(adfDocument, (document) => {
|
||||
assert.deepEqual(adfToPlainMarkdown(document), adfToPlainMarkdown(toEditorNormal(document)))
|
||||
}),
|
||||
propertyRuns(gateRuns),
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user