Skip to content

Commit 3ed70ba

Browse files
committedFeb 4, 2023
Add tests for exposed identifiers
1 parent 922b40a commit 3ed70ba

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

‎test.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import process from 'node:process'
44
import test from 'node:test'
55
import strip from 'strip-ansi'
66
import {VFile} from 'vfile'
7-
import reporterDefault, {reporter} from './index.js'
7+
import {reporter} from './index.js'
8+
import * as mod from './index.js'
89

910
// `log-symbols` without chalk, ignored for Windows:
1011
/* c8 ignore next 4 */
@@ -51,10 +52,16 @@ try {
5152
}
5253
/* eslint-enable no-undef */
5354

54-
test('vfile-reporter', () => {
55+
test('reporter', () => {
56+
assert.deepEqual(
57+
Object.keys(mod).sort(),
58+
['default', 'reporter'],
59+
'should expose the public api'
60+
)
61+
5562
assert.equal(
56-
reporter,
57-
reporterDefault,
63+
mod.reporter,
64+
mod.default,
5865
'should expose `reporter` as a named and a default export'
5966
)
6067

0 commit comments

Comments
 (0)
Please sign in to comment.