1
1
/**
2
2
* @typedef {import('estree').Program } Program
3
- * @typedef {import('estree').Comment } Comment
4
3
* @typedef {import('estree').Node } Node
5
4
* @typedef {import('hast').Root } Root
6
5
* @typedef {import('hast').Content } Content
@@ -918,9 +917,9 @@ test('integration (@babel/plugin-transform-react-jsx, react)', (t) => {
918
917
t . deepEqual (
919
918
transform ( '# Hi <Icon /> {"!"}' , { runtime : 'automatic' } ) ,
920
919
[
920
+ 'import { Fragment as _Fragment } from "react/jsx-runtime";' ,
921
921
'import { jsx as _jsx } from "react/jsx-runtime";' ,
922
922
'import { jsxs as _jsxs } from "react/jsx-runtime";' ,
923
- 'import { Fragment as _Fragment } from "react/jsx-runtime";' ,
924
923
'/*#__PURE__*/_jsx(_Fragment, {' ,
925
924
' children: /*#__PURE__*/_jsxs("h1", {' ,
926
925
' children: ["Hi ", /*#__PURE__*/_jsx(Icon, {}), " ", "!"]' ,
@@ -932,7 +931,7 @@ test('integration (@babel/plugin-transform-react-jsx, react)', (t) => {
932
931
933
932
t . deepEqual (
934
933
transform ( '# Hi <Icon /> {"!"}' , { pragma : 'a' , pragmaFrag : 'b' } ) ,
935
- 'a(b , null, a("h1", null, "Hi ", a(Icon, null), " ", "!"));' ,
934
+ 'a("b" , null, a("h1", null, "Hi ", a(Icon, null), " ", "!"));' ,
936
935
'should integrate w/ `@babel/plugin-transform-react-jsx` (pragma, pragmaFrag)'
937
936
)
938
937
@@ -943,9 +942,9 @@ test('integration (@babel/plugin-transform-react-jsx, react)', (t) => {
943
942
) ,
944
943
[
945
944
'import /* a */a from "b";' ,
945
+ 'import { Fragment as _Fragment } from "react/jsx-runtime";' ,
946
946
'import { jsx as _jsx } from "react/jsx-runtime";' ,
947
947
'import { jsxs as _jsxs } from "react/jsx-runtime";' ,
948
- 'import { Fragment as _Fragment } from "react/jsx-runtime";' ,
949
948
'/*#__PURE__*/_jsx(_Fragment, {' ,
950
949
' children: /*#__PURE__*/_jsxs("h1", {' ,
951
950
' children: [" ", /*#__PURE__*/_jsx("x", {' ,
0 commit comments