Add tests for binding elements that need to be renamed

This commit is contained in:
Andrew Branch 2019-04-17 15:28:57 -07:00
parent 42c9b47add
commit ef18453166
No known key found for this signature in database
GPG Key ID: 22CCA4B120C427D2

View File

@ -355,6 +355,16 @@ function [#|f|](): Promise<void>{
_testConvertToAsyncFunction("convertToAsyncFunction_objectBindingPattern", `
function [#|f|](): Promise<void>{
return fetch('https://typescriptlang.org').then(({ result }) => { console.log(result) });
}`);
_testConvertToAsyncFunction("convertToAsyncFunction_arrayBindingPatternRename", `
function [#|f|](): Promise<void>{
const result = getResult();
return fetch('https://typescriptlang.org').then(([result]) => { console.log(result) });
}`);
_testConvertToAsyncFunction("convertToAsyncFunction_objectBindingPatternRename", `
function [#|f|](): Promise<void>{
const result = getResult();
return fetch('https://typescriptlang.org').then(({ result }) => { console.log(result) });
}`);
_testConvertToAsyncFunction("convertToAsyncFunction_basicNoReturnTypeAnnotation", `
function [#|f|]() {