-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { tests } from 'commonmark-spec' | ||
import { nuemark } from '../index.js' | ||
|
||
tests.forEach(v => { | ||
v.markdown = v.markdown.replaceAll('→', '\t').trimEnd() | ||
v.html = v.html.replaceAll('→', '\t').trimEnd() | ||
}) | ||
|
||
const skipSections = ['Tabs', 'Indented code blocks', 'Raw HTML', 'HTML blocks'] | ||
const skipNumbers = [] | ||
|
||
for (const testCase of tests) { | ||
if (skipSections.includes(testCase.section) || | ||
skipNumbers.includes(testCase.number)) continue | ||
|
||
test(`cmark spec: ${testCase.section}; ${testCase.number}`, () => { | ||
console.log(testCase.number, JSON.stringify(testCase.markdown)) | ||
expect(nuemark(testCase.markdown)).toEqual(testCase.html) | ||
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (ubuntu-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
Check failure on line 18 in packages/nuemark/test/cmark.test.js GitHub Actions / test (macos-latest, bun)error: expect(received).toEqual(expected)
|
||
}) | ||
} |