mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 02:30:15 -06:00
Test for existence of diagnostic when running tests
This commit is contained in:
parent
29dbabe2e1
commit
d21c078363
@ -362,11 +362,11 @@ interface Array<T> {}`
|
||||
|
||||
const diagnostics = languageService.getSuggestionDiagnostics(f.path);
|
||||
const diagnostic = find(diagnostics, diagnostic => diagnostic.messageText === description.message);
|
||||
assert.isNotNull(diagnostic);
|
||||
assert.exists(diagnostic);
|
||||
|
||||
const actions = codefix.getFixes(context);
|
||||
const action = find(actions, action => action.description === description.message)!;
|
||||
assert.isNotNull(action);
|
||||
assert.exists(action);
|
||||
|
||||
const data: string[] = [];
|
||||
data.push(`// ==ORIGINAL==`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user