aboutsummaryrefslogtreecommitdiff
path: root/integration/snapshots/optional-chain-with-function.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-08 17:42:18 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-08 17:42:18 -0800
commit351184991abf926ec52d798a29afafd02486859a (patch)
tree002d1b2a6ada1ce7a991826422ae0f92f5d0c7e9 /integration/snapshots/optional-chain-with-function.js
parent14b51ef57c289f6a2622e0848b11d757183cd24d (diff)
downloadbun-351184991abf926ec52d798a29afafd02486859a.tar.gz
bun-351184991abf926ec52d798a29afafd02486859a.tar.zst
bun-351184991abf926ec52d798a29afafd02486859a.zip
:camera:
Diffstat (limited to 'integration/snapshots/optional-chain-with-function.js')
-rw-r--r--integration/snapshots/optional-chain-with-function.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/integration/snapshots/optional-chain-with-function.js b/integration/snapshots/optional-chain-with-function.js
new file mode 100644
index 000000000..6f963caa2
--- /dev/null
+++ b/integration/snapshots/optional-chain-with-function.js
@@ -0,0 +1,13 @@
+export function test() {
+ try {
+ const multipleSecondaryValues = undefined;
+ const ratings = ["123"];
+ var bar = multipleSecondaryValues?.map((value) => false);
+ bar = bar?.multipleSecondaryValues?.map((value) => false);
+ bar = bar?.bar?.multipleSecondaryValues?.map((value) => false);
+ bar = {}?.bar?.multipleSecondaryValues?.map((value) => false);
+ } catch (e) {
+ throw e;
+ }
+ return testDone(import.meta.url);
+}