Skip to content

Commit 0f73b04

Browse files
committed
fixup! feat: generate the import declaration for the completion item code actions
1 parent f4bd10d commit 0f73b04

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

integration/lsp/ivy_spec.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,10 +603,9 @@ export class AppComponent {
603603
{'start': {'line': 5, 'character': 45}, 'end': {'line': 5, 'character': 45}}
604604
},
605605
{
606-
'newText':
607-
'{\n declarations: [\n AppComponent,\n FooComponent,\n ],\n bootstrap: [AppComponent],\n imports: [\n CommonModule,\n PostModule,\n BarComponent\n ]\n}',
606+
'newText': 'imports: [\n CommonModule,\n PostModule,\n BarComponent\n]',
608607
'range':
609-
{'start': {'line': 7, 'character': 10}, 'end': {'line': 17, 'character': 1}}
608+
{'start': {'line': 8, 'character': 2}, 'end': {'line': 11, 'character': 3}}
610609
}
611610
]
612611
}
@@ -626,9 +625,8 @@ export class AppComponent {
626625
const libPostResponse = response.find(res => res.label === 'baz-component')!;
627626
const detail = await client.sendRequest(lsp.CompletionResolveRequest.type, libPostResponse);
628627
expect(detail.additionalTextEdits).toEqual([{
629-
'newText':
630-
'{\n selector: \'bar-component\',\n template: `<`,\n standalone: true,\n imports: [BazComponent]\n}',
631-
'range': {'start': {'line': 11, 'character': 11}, 'end': {'line': 15, 'character': 1}}
628+
'newText': ',\n imports: [BazComponent]',
629+
'range': {'start': {'line': 14, 'character': 20}, 'end': {'line': 14, 'character': 20}}
632630
}]);
633631
});
634632
});

0 commit comments

Comments
 (0)