fixed lint error for MongoIndexPolicyComponentTest

This commit is contained in:
Srinath Narayanan
2021-05-27 10:33:16 +05:30
parent a20620db0e
commit 1bf00f65b8
2 changed files with 8 additions and 7 deletions

View File

@@ -230,4 +230,4 @@
"prettier": {
"printWidth": 120
}
}
}

View File

@@ -109,12 +109,13 @@ describe("MongoIndexingPolicyComponent", () => {
expect(mongoIndexingPolicyComponent.isMongoIndexingPolicyDiscardable()).toEqual(
isMongoIndexingPolicyDiscardable
);
if (mongoWarningNotificationMessage) {
const elementAsString = renderToString(mongoIndexingPolicyComponent.getMongoWarningNotificationMessage());
expect(elementAsString).toContain(mongoWarningNotificationMessage);
} else {
expect(mongoIndexingPolicyComponent.getMongoWarningNotificationMessage()).toBeUndefined();
}
const warningNotificationElementAsString = renderToString(
mongoIndexingPolicyComponent.getMongoWarningNotificationMessage()
);
expect(warningNotificationElementAsString.includes(mongoWarningNotificationMessage)).toEqual(
!!mongoWarningNotificationMessage
);
}
);
});