Skip to content

Commit

Permalink
fixup! feat: generate the import declaration for the completion item …
Browse files Browse the repository at this point in the history
…code actions
  • Loading branch information
ivanwonder committed May 19, 2024
1 parent 6950674 commit d4fe906
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions integration/lsp/ivy_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,9 @@ export class AppComponent {
{'start': {'line': 5, 'character': 45}, 'end': {'line': 5, 'character': 45}}
},
{
'newText':
'{\n declarations: [\n AppComponent,\n FooComponent,\n ],\n bootstrap: [AppComponent],\n imports: [\n CommonModule,\n PostModule,\n BarComponent\n ]\n}',
'newText': 'imports: [\n CommonModule,\n PostModule,\n BarComponent\n]',
'range':
{'start': {'line': 7, 'character': 10}, 'end': {'line': 17, 'character': 1}}
{'start': {'line': 8, 'character': 2}, 'end': {'line': 11, 'character': 3}}
}
]
}
Expand All @@ -626,9 +625,8 @@ export class AppComponent {
const libPostResponse = response.find(res => res.label === 'baz-component')!;
const detail = await client.sendRequest(lsp.CompletionResolveRequest.type, libPostResponse);
expect(detail.additionalTextEdits).toEqual([{
'newText':
'{\n selector: \'bar-component\',\n template: `<`,\n standalone: true,\n imports: [BazComponent]\n}',
'range': {'start': {'line': 11, 'character': 11}, 'end': {'line': 15, 'character': 1}}
'newText': ',\n imports: [BazComponent]',
'range': {'start': {'line': 14, 'character': 20}, 'end': {'line': 14, 'character': 20}}
}]);
});
});
Expand Down

0 comments on commit d4fe906

Please sign in to comment.