mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-27 06:30:32 +00:00
Add arrow function async test
This commit is contained in:
parent
62e2fc9826
commit
e0a31991dc
@ -2258,6 +2258,15 @@ function run_javascript_tests(test_obj, Urlencoded, js_beautify, html_beautify,
|
||||
' yield b;\n' +
|
||||
' }\n' +
|
||||
'}');
|
||||
bt(
|
||||
'a = {\n' +
|
||||
' myVar: async () => {\n' +
|
||||
' return a;\n' +
|
||||
' },\n' +
|
||||
' myOtherVar: async async () => {\n' +
|
||||
' yield b;\n' +
|
||||
' }\n' +
|
||||
'}');
|
||||
|
||||
|
||||
//============================================================
|
||||
|
@ -2028,6 +2028,15 @@ class TestJSBeautifier(unittest.TestCase):
|
||||
' yield b;\n' +
|
||||
' }\n' +
|
||||
'}')
|
||||
bt(
|
||||
'a = {\n' +
|
||||
' myVar: async () => {\n' +
|
||||
' return a;\n' +
|
||||
' },\n' +
|
||||
' myOtherVar: async async () => {\n' +
|
||||
' yield b;\n' +
|
||||
' }\n' +
|
||||
'}')
|
||||
|
||||
|
||||
#============================================================
|
||||
|
@ -1003,6 +1003,18 @@ exports.test_data = {
|
||||
' }',
|
||||
'}'
|
||||
]
|
||||
},
|
||||
{
|
||||
unchanged: [
|
||||
'a = {',
|
||||
' myVar: async () => {',
|
||||
' return a;',
|
||||
' },',
|
||||
' myOtherVar: async async () => {',
|
||||
' yield b;',
|
||||
' }',
|
||||
'}'
|
||||
]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
|
Loading…
Reference in New Issue
Block a user