]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/tests/lib/rules/operator-linebreak.js
import and build new upstream release 7.2.0
[pve-eslint.git] / eslint / tests / lib / rules / operator-linebreak.js
index 3910ac8a0e7f45b1b6ccf0f2e3de06425a79e3ab..18a37e3fc80aca6211fd111f8912f80427be9eaa 100644 (file)
@@ -628,6 +628,16 @@ ruleTester.run("operator-linebreak", rule, {
                 endLine: 1,
                 endColumn: 14
             }]
+        },
+        {
+            code: "foo ??\n bar",
+            output: "foo\n ?? bar",
+            options: ["after", { overrides: { "??": "before" } }],
+            parserOptions: { ecmaVersion: 2020 },
+            errors: [{
+                messageId: "operatorAtBeginning",
+                data: { operator: "??" }
+            }]
         }
     ]
 });