Skip to content

A platform for community discussion. Free, open, simple.

DEV: warns instead of raise exception, test should fail if legit error anyways (#7239)

Joffrey JAFFEUXeec7822d7c2f
diff --git a/test/javascripts/helpers/select-kit-helper.js b/test/javascripts/helpers/select-kit-helper.js
index 0e8ad5c143e..8d6aebb3cf6 100644
--- a/test/javascripts/helpers/select-kit-helper.js
+++ b/test/javascripts/helpers/select-kit-helper.js
@@ -1,6 +1,7 @@
function checkSelectKitIsNotExpanded(selector) {
if (find(selector).hasClass("is-expanded")) {
- throw new Error(
+ // eslint-disable-next-line no-console
+ console.warn(
"You expected select-kit to be collapsed but it is expanded."
);
}
@@ -8,7 +9,8 @@ function checkSelectKitIsNotExpanded(selector) {
function checkSelectKitIsNotCollapsed(selector) {
if (!find(selector).hasClass("is-expanded")) {
- throw new Error(
+ // eslint-disable-next-line no-console
+ console.warn(
"You expected select-kit to be expanded but it is collapsed."
);
}