Skip to content

Commit fc725ca

Browse files
committed
Change to use exports
1 parent 04e67ed commit fc725ca

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
],
2727
"sideEffects": false,
2828
"type": "module",
29-
"main": "index.js",
30-
"types": "index.d.ts",
29+
"exports": "./index.js",
3130
"files": [
3231
"lib/",
3332
"index.d.ts",

test/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@ import process from 'node:process'
88
import test from 'node:test'
99
import {JSDOM} from 'jsdom'
1010
import {h, s} from 'hastscript'
11+
import {toDom} from 'hast-util-to-dom'
1112
import serialize from 'w3c-xmlserializer'
1213
import {webNamespaces} from 'web-namespaces'
13-
import {toDom} from '../index.js'
1414

1515
const document = new JSDOM().window.document
1616

1717
globalThis.document = document
1818

1919
test('toDom', async function (t) {
2020
await t.test('should expose the public api', async function () {
21-
assert.deepEqual(Object.keys(await import('../index.js')).sort(), ['toDom'])
21+
assert.deepEqual(Object.keys(await import('hast-util-to-dom')).sort(), [
22+
'toDom'
23+
])
2224
})
2325

2426
await t.test('should create an empty root node', async function () {

0 commit comments

Comments
 (0)