Skip to content

Commit ef18453

Browse files
committed
Add tests for binding elements that need to be renamed
1 parent 42c9b47 commit ef18453

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/testRunner/unittests/services/convertToAsyncFunction.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,16 @@ function [#|f|](): Promise<void>{
355355
_testConvertToAsyncFunction("convertToAsyncFunction_objectBindingPattern", `
356356
function [#|f|](): Promise<void>{
357357
return fetch('https://typescriptlang.org').then(({ result }) => { console.log(result) });
358+
}`);
359+
_testConvertToAsyncFunction("convertToAsyncFunction_arrayBindingPatternRename", `
360+
function [#|f|](): Promise<void>{
361+
const result = getResult();
362+
return fetch('https://typescriptlang.org').then(([result]) => { console.log(result) });
363+
}`);
364+
_testConvertToAsyncFunction("convertToAsyncFunction_objectBindingPatternRename", `
365+
function [#|f|](): Promise<void>{
366+
const result = getResult();
367+
return fetch('https://typescriptlang.org').then(({ result }) => { console.log(result) });
358368
}`);
359369
_testConvertToAsyncFunction("convertToAsyncFunction_basicNoReturnTypeAnnotation", `
360370
function [#|f|]() {

0 commit comments

Comments
 (0)