Normalize line endings to get micromark test passing on Windows.

This commit is contained in:
David Anson 2023-01-12 21:06:58 -08:00
parent 366a498150
commit 7142bbd8ed

View file

@ -1,10 +1,11 @@
import fs from "node:fs/promises"; import fs from "node:fs/promises";
import test from "ava"; import test from "ava";
import newLineRe from "../helpers/helpers.js";
import { parse } from "../lib/micromark.mjs"; import { parse } from "../lib/micromark.mjs";
test("parse", async(t) => { test("parse", async(t) => {
t.plan(1); t.plan(1);
const content = await fs.readFile("./test/every-markdown-syntax.md", "utf8"); const content = await fs.readFile("./test/every-markdown-syntax.md", "utf8");
const document = parse(content); const document = parse(content.split(newLineRe).join("\n"));
t.snapshot(document, "Unexpected tokens"); t.snapshot(document, "Unexpected tokens");
}); });