Test for existence of diagnostic when running tests

This commit is contained in:
Benjamin Lichtman 2018-08-15 16:19:54 -07:00
parent 29dbabe2e1
commit d21c078363

View file

@ -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==`);