Skip to content

Commit

Permalink
Change to use export map
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 3, 2023
1 parent b3d27ae commit 824f157
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
9 changes: 8 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {findBefore} from './index.js'
import {findBefore} from 'unist-util-find-before'

test('`findBefore`', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(
Object.keys(await import('unist-util-find-before')).sort(),
['findBefore']
)
})

const tree = fromMarkdown('Some *emphasis*, **importance**, and `code`.')

assert(tree.type === 'root')
Expand Down

0 comments on commit 824f157

Please sign in to comment.