clang-format: [JS] Don't put top-level typescript enums on a single line.

This makes this consistent with non-typescript enums.

Also shuffle the language-dependent stuff in mustBreakBefore to a
single location.

Patch initiated by Martin Probst.

llvm-svn: 239894
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 2911f0e..2c20ab0 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -690,6 +690,14 @@
 
 TEST_F(FormatTestJS, EnumDeclarations) {
   verifyFormat("enum Foo {\n"
+               "  A = 1,\n"
+               "  B\n"
+               "}");
+  verifyFormat("export /* somecomment*/ enum Foo {\n"
+               "  A = 1,\n"
+               "  B\n"
+               "}");
+  verifyFormat("enum Foo {\n"
                "  A = 1,  // comment\n"
                "  B\n"
                "}\n"