diff --git a/Userland/Libraries/LibJS/Tests/syntax/new-with-optional-chaining.js b/Userland/Libraries/LibJS/Tests/syntax/new-with-optional-chaining.js new file mode 100644 index 0000000000..3c48c5829f --- /dev/null +++ b/Userland/Libraries/LibJS/Tests/syntax/new-with-optional-chaining.js @@ -0,0 +1,5 @@ +describe("parsing new expressions with optional chaining", () => { + expect("new Object()?.foo").toEval(); + expect("new Object?.foo").not.toEval(); + expect("(new Object)?.foo").toEval(); +});