1
1
/**
2
- * @typedef {import('../index.js').Fragment } Fragment
3
- * @typedef {import('../index.js').Jsx } Jsx
4
- * @typedef {import('../index.js').JsxDev } JsxDev
2
+ * @typedef {import('hast-util-to-jsx-runtime').Fragment } Fragment
3
+ * @typedef {import('hast-util-to-jsx-runtime').Jsx } Jsx
4
+ * @typedef {import('hast-util-to-jsx-runtime').JsxDev } JsxDev
5
+ *
5
6
* @typedef {import('../lib/index.js').Source } Source
6
7
*/
7
8
8
9
import assert from 'node:assert/strict'
9
10
import test from 'node:test'
10
11
import { h , s } from 'hastscript'
12
+ import { toJsxRuntime } from 'hast-util-to-jsx-runtime'
11
13
import React from 'react'
12
14
import * as dev from 'react/jsx-dev-runtime'
13
15
import * as prod from 'react/jsx-runtime'
14
16
import { renderToStaticMarkup } from 'react-dom/server'
15
- import { toJsxRuntime } from '../index.js'
16
17
17
18
/** @type {{Fragment: Fragment, jsx: Jsx, jsxs: Jsx} } */
18
19
// @ts -expect-error: the react types are missing.
@@ -24,9 +25,10 @@ const development = {Fragment: dev.Fragment, jsxDEV: dev.jsxDEV}
24
25
25
26
test ( 'core' , async function ( t ) {
26
27
await t . test ( 'should expose the public api' , async function ( ) {
27
- assert . deepEqual ( Object . keys ( await import ( '../index.js' ) ) . sort ( ) , [
28
- 'toJsxRuntime'
29
- ] )
28
+ assert . deepEqual (
29
+ Object . keys ( await import ( 'hast-util-to-jsx-runtime' ) ) . sort ( ) ,
30
+ [ 'toJsxRuntime' ]
31
+ )
30
32
} )
31
33
32
34
await t . test (
0 commit comments