Skip to content

Commit

Permalink
Use Node test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed May 14, 2023
1 parent ae572b4 commit 4158a3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@
"micromark-util-types": "^1.0.0"
},
"devDependencies": {
"@types/tape": "^4.0.0",
"@types/node": "^20.0.0",
"c8": "^7.0.0",
"micromark": "^3.0.0",
"prettier": "^2.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"tape": "^5.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.54.0"
Expand Down
11 changes: 5 additions & 6 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import test from 'tape'
import assert from 'node:assert/strict'
import test from 'node:test'
import {micromark} from 'micromark'
import {mdxjs} from './index.js'

test('markdown -> html (micromark)', (t) => {
t.deepEqual(
test('markdown -> html (micromark)', function () {
assert.equal(
micromark('<div>\n{asd}\n</div>', {extensions: [mdxjs()]}),
'\n\n',
'should work'
)

t.deepEqual(
assert.equal(
micromark('<x {...{"{": 1}} />\n{1 + /*}*/ + 2}', {extensions: [mdxjs()]}),
'\n',
'should be gnostic'
)

t.end()
})

0 comments on commit 4158a3c

Please sign in to comment.