diff --git a/js/test/beautify-tests.js b/js/test/beautify-tests.js index 84217404..e59ede64 100755 --- a/js/test/beautify-tests.js +++ b/js/test/beautify-tests.js @@ -509,7 +509,8 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify) bt('var a = new function() {};'); bt('var a = new function a()\n {};'); test_fragment('new function'); - + bt("foo({\n 'a': 1\n},\n10);", + "foo(\n {\n 'a': 1\n },\n 10);"); opts.brace_style = 'collapse'; @@ -546,6 +547,8 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify) bt('var a = new function() {};'); bt('var a = new function a() {};'); test_fragment('new function'); + bt("foo({\n 'a': 1\n},\n10);", + "foo({\n 'a': 1\n },\n 10);"); opts.brace_style = "end-expand"; @@ -582,6 +585,8 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify) bt('var a = new function() {};'); bt('var a = new function a() {};'); test_fragment('new function'); + bt("foo({\n 'a': 1\n},\n10);", + "foo({\n 'a': 1\n },\n 10);"); opts.brace_style = 'collapse'; diff --git a/python/jsbeautifier/tests/testjsbeautifier.py b/python/jsbeautifier/tests/testjsbeautifier.py index 6c828276..001ccfa2 100644 --- a/python/jsbeautifier/tests/testjsbeautifier.py +++ b/python/jsbeautifier/tests/testjsbeautifier.py @@ -463,7 +463,8 @@ class TestJSBeautifier(unittest.TestCase): bt('var a = new function() {};'); bt('var a = new function a()\n {};'); test_fragment('new function'); - + bt("foo({\n 'a': 1\n},\n10);", + "foo(\n {\n 'a': 1\n },\n 10);"); self.options.brace_style = 'collapse'; @@ -500,6 +501,8 @@ class TestJSBeautifier(unittest.TestCase): bt('var a = new function() {};'); bt('var a = new function a() {};'); test_fragment('new function'); + bt("foo({\n 'a': 1\n},\n10);", + "foo({\n 'a': 1\n },\n 10);"); self.options.brace_style = "end-expand"; @@ -536,6 +539,8 @@ class TestJSBeautifier(unittest.TestCase): bt('var a = new function() {};'); bt('var a = new function a() {};'); test_fragment('new function'); + bt("foo({\n 'a': 1\n},\n10);", + "foo({\n 'a': 1\n },\n 10);"); self.options.brace_style = 'collapse';