Skip to content

Commit

Permalink
Add tests for babel/babel#12221
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Nov 6, 2020
1 parent 30099fa commit f934269
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -13,3 +13,14 @@ exports[`type-annotation-func.ts error test 1`] = `
| ^
2 | "
`;
exports[`type-annotation-in-jsx.tsx error test 1`] = `
"Did not expect a type annotation here. (3:22)
1 | function Foo() {
2 | return (
> 3 | <div propA={[ key: value ]} propsB={(a: b)} />
| ^
4 | );
5 | }
6 | "
`;
5 changes: 5 additions & 0 deletions tests/misc/errors/babel-ts/type-annotation-in-jsx.tsx
@@ -0,0 +1,5 @@
function Foo() {
return (
<div propA={[ key: value ]} propsB={(a: b)} />
);
}

0 comments on commit f934269

Please sign in to comment.