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 5, 2023
1 parent 043d922 commit 798ca2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
7 changes: 4 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* @typedef {import('mdast').Content} Content
* @typedef {import('mdast').Root} Root
*/

import assert from 'node:assert/strict'
import test from 'node:test'
import {u} from 'unist-builder'
import {map} from './index.js'
import {map} from 'unist-util-map'

test('map', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['map'])
assert.deepEqual(Object.keys(await import('unist-util-map')).sort(), [
'map'
])
})

await t.test('should map the specified node', async function () {
Expand Down

0 comments on commit 798ca2a

Please sign in to comment.