Skip to content

Commit

Permalink
Change to use exports
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 22, 2023
1 parent 6ec236e commit 864fbc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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
9 changes: 5 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import {remark} from 'remark'
import remarkMessageControl from 'remark-message-control'
import remarkToc from 'remark-toc'
import remarkMessageControl from './index.js'

test('remarkMessageControl', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
'default'
])
assert.deepEqual(
Object.keys(await import('remark-message-control')).sort(),
['default']
)
})

await t.test('should throw w/o options', async function () {
Expand Down

0 comments on commit 864fbc2

Please sign in to comment.