mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Test for existence of diagnostic when running tests
This commit is contained in:
@@ -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==`);
|
||||
|
||||
Reference in New Issue
Block a user