[frontend] Fix flaky test
@@ -69,9 +69,6 @@ describe('AutocompleteResults.js', () => {
deferred.done(options.successCallback);
- if (Math.random() < 0.5) {
- deferred.resolve(failResponse);
- } else {
deferred.resolve({
superuser: 'hdfs',
current_request_path: '/filebrowser/view=///var',
@@ -226,7 +223,6 @@ describe('AutocompleteResults.js', () => {
start_index: 1
}
});
- }
return deferred.promise();
});
@@ -279,7 +275,6 @@ describe('AutocompleteResults.js', () => {
});
LOTS_OF_PARSE_RESULTS.forEach(parseResult => {
- if (parseResult.index === 213) {
it('should handle parse result no. ' + parseResult.index, () => {
if (parseResult.suggestKeywords) {
const cleanedKeywords = [];
@@ -304,7 +299,6 @@ describe('AutocompleteResults.js', () => {
expect(subject.loading()).toBeFalsy();
});
- }
});
});
