diff options
| author | Jackson Ray Hamilton | 2019-03-26 21:47:34 -0700 |
|---|---|---|
| committer | Jackson Ray Hamilton | 2019-04-08 22:48:23 -0700 |
| commit | 462baabed93228a00e5ccadbe5704fb317957cb7 (patch) | |
| tree | fb2c17ab62ae802c92f05597177cc0705e10ed4f /test | |
| parent | afec4511cf5c336eaf9f8bb1425bf2dd1fc12740 (diff) | |
| download | emacs-462baabed93228a00e5ccadbe5704fb317957cb7.tar.gz emacs-462baabed93228a00e5ccadbe5704fb317957cb7.zip | |
Add tests for miscellaneous JSX parsing feats
* test/manual/indent/jsx.jsx: Add tests for JSXMemberExpression names
and JSXOpeningFragment/JSXClosingFragment support (already supported).
Diffstat (limited to 'test')
| -rw-r--r-- | test/manual/indent/jsx.jsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/manual/indent/jsx.jsx b/test/manual/indent/jsx.jsx index 5004d57a0b1..c200979df8c 100644 --- a/test/manual/indent/jsx.jsx +++ b/test/manual/indent/jsx.jsx | |||
| @@ -93,6 +93,32 @@ return ( | |||
| 93 | } /> | 93 | } /> |
| 94 | ) | 94 | ) |
| 95 | 95 | ||
| 96 | // JSXMemberExpression names are parsed/indented: | ||
| 97 | <Foo.Bar> | ||
| 98 | <div> | ||
| 99 | <Foo.Bar> | ||
| 100 | Hello World! | ||
| 101 | </Foo.Bar> | ||
| 102 | <Foo.Bar> | ||
| 103 | <div> | ||
| 104 | </div> | ||
| 105 | </Foo.Bar> | ||
| 106 | </div> | ||
| 107 | </Foo.Bar> | ||
| 108 | |||
| 109 | // JSXOpeningFragment and JSXClosingFragment are parsed/indented: | ||
| 110 | <> | ||
| 111 | <div> | ||
| 112 | <> | ||
| 113 | Hello World! | ||
| 114 | </> | ||
| 115 | <> | ||
| 116 | <div> | ||
| 117 | </div> | ||
| 118 | </> | ||
| 119 | </div> | ||
| 120 | </> | ||
| 121 | |||
| 96 | // Indent void expressions (no need for contextual parens / commas) | 122 | // Indent void expressions (no need for contextual parens / commas) |
| 97 | // (https://github.com/mooz/js2-mode/issues/140#issuecomment-166250016). | 123 | // (https://github.com/mooz/js2-mode/issues/140#issuecomment-166250016). |
| 98 | <div className="class-name"> | 124 | <div className="class-name"> |