Skip to content

Commit c765093

Browse files
committed
test: @putout/printer: JSXElement: inside ReturnStatement: coverage
1 parent b234bd4 commit c765093

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function a() {
2+
return (
3+
<a></a>
4+
);
5+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function a() {
2+
return <a></a>;
3+
}

lib/tokenize/jsx/index.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,12 @@ test('printer: tokenizer: jsx: parenthesized', (t) => {
160160
t.equal(result, fixture.jsxParenthesizedFix);
161161
t.end();
162162
});
163+
164+
test('printer: tokenizer: jsx: inside return', (t) => {
165+
const source = fixture.jsxInsideReturn;
166+
const ast = parse(source);
167+
const result = print(ast);
168+
169+
t.equal(result, fixture.jsxInsideReturnFix);
170+
t.end();
171+
});

0 commit comments

Comments
 (0)