mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-27 14:40:23 +00:00
parent
3f3fd7bf5c
commit
6210928940
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user