summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/pipeline/receiver.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/non262/pipeline/receiver.js')
-rw-r--r--js/src/tests/non262/pipeline/receiver.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/tests/non262/pipeline/receiver.js b/js/src/tests/non262/pipeline/receiver.js
new file mode 100644
index 0000000000..588a83e169
--- /dev/null
+++ b/js/src/tests/non262/pipeline/receiver.js
@@ -0,0 +1,24 @@
+const BUGNUMBER = 1405943;
+const summary = "Implement pipeline operator (receiver)";
+
+print(BUGNUMBER + ": " + summary);
+
+if (hasPipeline()) {
+ // Receiver
+ eval(`
+ const receiver = {
+ foo: function (value, extra) {
+ assertEq(value, 10);
+ assertEq(extra, undefined);
+ assertEq(arguments.length, 1);
+ assertEq(arguments[0], 10)
+ assertEq(this, receiver);
+ },
+ };
+
+ 10 |> receiver.foo;
+ `);
+}
+
+if (typeof reportCompare === "function")
+ reportCompare(0, 0);