Add tests for miscellaneous JSX parsing feats
* test/manual/indent/jsx.jsx: Add tests for JSXMemberExpression names and JSXOpeningFragment/JSXClosingFragment support (already supported).
This commit is contained in:
parent
afec4511cf
commit
462baabed9
1 changed files with 26 additions and 0 deletions
|
@ -93,6 +93,32 @@ return (
|
|||
} />
|
||||
)
|
||||
|
||||
// JSXMemberExpression names are parsed/indented:
|
||||
<Foo.Bar>
|
||||
<div>
|
||||
<Foo.Bar>
|
||||
Hello World!
|
||||
</Foo.Bar>
|
||||
<Foo.Bar>
|
||||
<div>
|
||||
</div>
|
||||
</Foo.Bar>
|
||||
</div>
|
||||
</Foo.Bar>
|
||||
|
||||
// JSXOpeningFragment and JSXClosingFragment are parsed/indented:
|
||||
<>
|
||||
<div>
|
||||
<>
|
||||
Hello World!
|
||||
</>
|
||||
<>
|
||||
<div>
|
||||
</div>
|
||||
</>
|
||||
</div>
|
||||
</>
|
||||
|
||||
// Indent void expressions (no need for contextual parens / commas)
|
||||
// (https://github.com/mooz/js2-mode/issues/140#issuecomment-166250016).
|
||||
<div className="class-name">
|
||||
|
|
Loading…
Add table
Reference in a new issue