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 Aug 24, 2023
1 parent aa3f5bf commit 04c579c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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
8 changes: 7 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import PluginError from 'plugin-error'
import {remark} from 'remark'
import remarkHtml from 'remark-html'
import remarkSlug from 'remark-slug'
import {gulpEngine} from 'unified-engine-gulp'
import File from 'vinyl'
import {gulpEngine} from '../index.js'
import {spy} from './spy.js'

const example = gulpEngine({
Expand All @@ -35,6 +35,12 @@ const report = [
].join('\n')

test('unified-engine-gulp', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('unified-engine-gulp')).sort(), [
'gulpEngine'
])
})

await t.test('should throw w/o options', async function () {
assert.throws(function () {
// @ts-expect-error: check how a missing `options` is handled.
Expand Down

0 comments on commit 04c579c

Please sign in to comment.