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 Jul 18, 2023
1 parent df2ac00 commit 5b447fb
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 @@ -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: 5 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import assert from 'node:assert/strict'
import fs from 'node:fs/promises'
import test from 'node:test'
import {affixEmoticonModifier} from 'nlcst-affix-emoticon-modifier'
import {emojiModifier} from 'nlcst-emoji-modifier'
import {emoticonModifier} from 'nlcst-emoticon-modifier'
import {ParseEnglish} from 'parse-english'
import {affixEmoticonModifier} from '../index.js'

const parser = new ParseEnglish()

Expand All @@ -28,9 +28,10 @@ const smile = JSON.parse(

test('affixEmoticonModifier', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('../index.js')).sort(), [
'affixEmoticonModifier'
])
assert.deepEqual(
Object.keys(await import('nlcst-affix-emoticon-modifier')).sort(),
['affixEmoticonModifier']
)
})

await t.test('should throw when not given a parent', async function () {
Expand Down

0 comments on commit 5b447fb

Please sign in to comment.