summaryrefslogtreecommitdiff
path: root/test/fixtures/source-map/babel-throw-original.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixtures/source-map/babel-throw-original.js')
-rw-r--r--test/fixtures/source-map/babel-throw-original.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/fixtures/source-map/babel-throw-original.js b/test/fixtures/source-map/babel-throw-original.js
new file mode 100644
index 0000000000..779bd16fd4
--- /dev/null
+++ b/test/fixtures/source-map/babel-throw-original.js
@@ -0,0 +1,19 @@
+/*---
+esid: prod-OptionalExpression
+features: [optional-chaining]
+---*/
+
+const obj = {
+ a: {
+ b: 22
+ }
+};
+
+function fn () {
+ return {};
+}
+
+setTimeout((err) => {
+ // OptionalExpression (MemberExpression OptionalChain) OptionalChain
+ if (obj?.a?.b === 22) throw Error('an exception');
+}, 5);