clang-format: [JS] Skip comments when applying the regex-literal heuristic

llvm-svn: 241264
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 40a2a1f..ef5901e 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -636,6 +636,8 @@
   verifyFormat("var regex =\n"
                "    /\"/;",
                getGoogleJSStyleWithColumns(15));
+  verifyFormat("var regex =  //\n"
+               "    /a/;");
 }
 
 TEST_F(FormatTestJS, RegexLiteralModifiers) {