Add arrow function async test

This commit is contained in:
Liam Newman 2018-10-18 01:46:18 -07:00
parent 62e2fc9826
commit e0a31991dc
3 changed files with 30 additions and 0 deletions

View File

@ -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' +
'}');
//============================================================

View File

@ -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' +
'}')
#============================================================

View File

@ -1003,6 +1003,18 @@ exports.test_data = {
' }',
'}'
]
},
{
unchanged: [
'a = {',
' myVar: async () => {',
' return a;',
' },',
' myOtherVar: async async () => {',
' yield b;',
' }',
'}'
]
}
]
}, {