summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/js-resources/js-chain.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/progmodes/js-resources/js-chain.js')
-rw-r--r--test/lisp/progmodes/js-resources/js-chain.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/lisp/progmodes/js-resources/js-chain.js b/test/lisp/progmodes/js-resources/js-chain.js
new file mode 100644
index 00000000000..2a290294026
--- /dev/null
+++ b/test/lisp/progmodes/js-resources/js-chain.js
@@ -0,0 +1,29 @@
+// Normal chaining.
+let x = svg.mumble()
+ .zzz;
+
+// Chaining with an intervening line comment.
+let x = svg.mumble() // line comment
+ .zzz;
+
+// Chaining with multiple dots.
+let x = svg.selectAll().something()
+ .zzz;
+
+// Nested chaining.
+let x = svg.selectAll(d3.svg.something()
+ .zzz);
+
+// Nothing to chain to.
+let x = svg()
+ .zzz;
+
+// Nothing to chain to.
+let x = svg().mumble.x() + 73
+ .zzz;
+
+// Local Variables:
+// indent-tabs-mode: nil
+// js-chain-indent: t
+// js-indent-level: 2
+// End: