diff options
Diffstat (limited to 'test/manual/indent/js-jsx.js')
-rw-r--r-- | test/manual/indent/js-jsx.js | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/test/manual/indent/js-jsx.js b/test/manual/indent/js-jsx.js new file mode 100644 index 00000000000..7401939d282 --- /dev/null +++ b/test/manual/indent/js-jsx.js @@ -0,0 +1,85 @@ +// -*- mode: js-jsx; -*- + +var foo = <div></div>; + +return ( + <div> + </div> + <div> + <div></div> + <div> + <div></div> + </div> + </div> +); + +React.render( + <div> + <div></div> + </div>, + { + a: 1 + }, + <div> + <div></div> + </div> +); + +return ( + // Sneaky! + <div></div> +); + +return ( + <div></div> + // Sneaky! +); + +React.render( + <input + />, + { + a: 1 + } +); + +return ( + <div> + {array.map(function () { + return { + a: 1 + }; + })} + </div> +); + +return ( + <div attribute={array.map(function () { + return { + a: 1 + }; + + return { + a: 1 + }; + + return { + a: 1 + }; + })}> + </div> +); + +// Local Variables: +// indent-tabs-mode: nil +// js-indent-level: 2 +// End: + +// The following test has intentionally unclosed elements and should +// be placed below all other tests to prevent awkward indentation. + +return ( + <div> + {array.map(function () { + return { + a: 1 |