We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 523f008 commit 1f66a62Copy full SHA for 1f66a62
test.js
@@ -3,8 +3,13 @@ import test from 'node:test'
3
import {h} from 'hastscript'
4
import {selectAll} from 'hast-util-select'
5
import {truncate} from './index.js'
6
+import * as mod from './index.js'
7
+
8
+test('truncate', () => {
9
+ const api = Object.keys(mod)
10
+ assert.ok(api.includes('truncate'), 'should expose `truncate`')
11
+ assert.equal(api.length, 1, 'should expose the public api')
12
-test('hastUtilTruncate', () => {
13
assert.deepEqual(
14
truncate(h('p', 'Lorem ipsum dolor sit amet'), {size: 11}),
15
h('p', 'Lorem ipsum'),
0 commit comments