@@ -44,40 +44,40 @@ export default function __AstroComponent_(_props: Record<string, any>): any {}\n
44
44
} ) ;
45
45
46
46
test ( 'does not escape tag opening unnecessarily' , async ( ) => {
47
- const input = `<div></div>
47
+ const input = `<div></div>
48
48
<div` ;
49
- const output = `${ TSXPrefix } <Fragment>
49
+ const output = `${ TSXPrefix } <Fragment>
50
50
<div></div>
51
51
<div
52
52
</Fragment>
53
53
export default function __AstroComponent_(_props: Record<string, any>): any {}\n` ;
54
- const { code } = await convertToTSX ( input , { sourcemap : 'external' } ) ;
55
- assert . snapshot ( code , output , 'expected code to match snapshot' ) ;
54
+ const { code } = await convertToTSX ( input , { sourcemap : 'external' } ) ;
55
+ assert . snapshot ( code , output , 'expected code to match snapshot' ) ;
56
56
} ) ;
57
57
58
58
test ( 'does not escape tag opening unnecessarily II' , async ( ) => {
59
- const input = `<div>
59
+ const input = `<div>
60
60
<div
61
61
</div>
62
62
` ;
63
- const output = `${ TSXPrefix } <Fragment>
63
+ const output = `${ TSXPrefix } <Fragment>
64
64
<div>
65
65
<div div {...{"<":true}}>
66
66
</div></div>
67
67
</Fragment>
68
68
export default function __AstroComponent_(_props: Record<string, any>): any {}\n` ;
69
- const { code } = await convertToTSX ( input , { sourcemap : 'external' } ) ;
70
- assert . snapshot ( code , output , 'expected code to match snapshot' ) ;
69
+ const { code } = await convertToTSX ( input , { sourcemap : 'external' } ) ;
70
+ assert . snapshot ( code , output , 'expected code to match snapshot' ) ;
71
71
} ) ;
72
72
73
73
test ( 'does not escape tag opening unnecessarily III' , async ( ) => {
74
- const input = '<div>{[].map((something) => <div><Blocknote</div><div><Image</div>)}</div>' ;
75
- const output = `${ TSXPrefix } <Fragment>
74
+ const input = '<div>{[].map((something) => <div><Blocknote</div><div><Image</div>)}</div>' ;
75
+ const output = `${ TSXPrefix } <Fragment>
76
76
<div>{[].map((something) => <Fragment><div><Blocknote< div><div><Image< div>)</Image<></div></Blocknote<></div></Fragment>}</div>
77
77
</Fragment>
78
78
export default function __AstroComponent_(_props: Record<string, any>): any {}\n` ;
79
- const { code } = await convertToTSX ( input , { sourcemap : 'external' } ) ;
80
- assert . snapshot ( code , output , 'expected code to match snapshot' ) ;
79
+ const { code } = await convertToTSX ( input , { sourcemap : 'external' } ) ;
80
+ assert . snapshot ( code , output , 'expected code to match snapshot' ) ;
81
81
} ) ;
82
82
83
83
test . run ( ) ;
0 commit comments