File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 25
25
],
26
26
"sideEffects" : false ,
27
27
"type" : " module" ,
28
- "main" : " index.js" ,
29
- "types" : " index.d.ts" ,
28
+ "exports" : " ./index.js" ,
30
29
"files" : [
31
30
" lib/" ,
32
31
" index.d.ts" ,
Original file line number Diff line number Diff line change 15
15
import assert from 'node:assert/strict'
16
16
import fs from 'node:fs/promises'
17
17
import test from 'node:test'
18
+ import { fromParse5 } from 'hast-util-from-parse5'
18
19
import { isHidden } from 'is-hidden'
19
20
import { parse , parseFragment } from 'parse5'
20
21
import { read , toVFile } from 'to-vfile'
21
22
import { visit } from 'unist-util-visit'
22
- import { fromParse5 } from '../index.js'
23
23
24
24
test ( 'fromParse5' , async function ( t ) {
25
25
const file = toVFile ( { value : '<title>Hello!</title><h1>World!' } )
26
26
27
27
await t . test ( 'should expose the public api' , async function ( ) {
28
- assert . deepEqual ( Object . keys ( await import ( '../index.js' ) ) . sort ( ) , [
29
- 'fromParse5'
30
- ] )
28
+ assert . deepEqual (
29
+ Object . keys ( await import ( 'hast-util-from-parse5' ) ) . sort ( ) ,
30
+ [ 'fromParse5' ]
31
+ )
31
32
} )
32
33
33
34
await t . test ( 'should transform a complete document' , async function ( ) {
You can’t perform that action at this time.
0 commit comments