]> git.eshelyaron.com Git - emacs.git/commitdiff
Add tests for miscellaneous JSX parsing feats
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Wed, 27 Mar 2019 04:47:34 +0000 (21:47 -0700)
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Tue, 9 Apr 2019 05:48:23 +0000 (22:48 -0700)
* test/manual/indent/jsx.jsx: Add tests for JSXMemberExpression names
and JSXOpeningFragment/JSXClosingFragment support (already supported).

test/manual/indent/jsx.jsx

index 5004d57a0b1d37e2a6a909c41292b08a6c706f1e..c200979df8cc3fdb545b7cef0aa77e0c6bb8bad5 100644 (file)
@@ -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">