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 6, 2023
1 parent f562960 commit da89a41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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
10 changes: 8 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import {retext} from 'retext'
import retextEmoji from 'retext-emoji'
import {u} from 'unist-builder'
import retextEmoji from './index.js'

const processor = retext().use(retextEmoji)

test('retext-emoji', async function (t) {
const processor = retext().use(retextEmoji)
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('retext-emoji')).sort(), [
'default'
])
})

await t.test('should throw when given invalid `convert`', async function () {
assert.throws(function () {
Expand Down

0 comments on commit da89a41

Please sign in to comment.