Skip to content

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

DEV: We already restore sinon after each test (#17529)

Jarek Radoszfacca3f46c33
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js
index 689b9be8594..3743d61c559 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js
@@ -145,7 +145,6 @@ acceptance("Composer Actions", function (needs) {
I18n.t("topic.create_long")
);
assert.ok(query(".d-editor-input").value.includes(quote));
- sinon.restore();
});
test("reply_as_new_topic without a new_topic draft", async function (assert) {
@@ -471,7 +470,6 @@ acceptance("Composer Actions With New Topic Draft", function (needs) {
} finally {
toggleCheckDraftPopup(false);
}
- sinon.restore();
});
test("reply_as_new_topic with new_topic draft", async function (assert) {
@@ -486,7 +484,6 @@ acceptance("Composer Actions With New Topic Draft", function (needs) {
I18n.t("composer.composer_actions.reply_as_new_topic.confirm")
);
await click(".modal-footer .btn.btn-default");
- sinon.restore();
});
});
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js
index 62690a7ef37..5c60c6086b0 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js
@@ -754,7 +754,6 @@ acceptance("Composer", function (needs) {
} finally {
toggleCheckDraftPopup(false);
}
- sinon.restore();
});
test("Loading draft also replaces the recipients", async function (assert) {
diff --git a/app/assets/javascripts/discourse/tests/unit/models/category-test.js b/app/assets/javascripts/discourse/tests/unit/models/category-test.js
index e8e88e67e38..87a6d95cb2c 100644
--- a/app/assets/javascripts/discourse/tests/unit/models/category-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/models/category-test.js
@@ -128,8 +128,6 @@ module("Unit | Model | category", function () {
bah,
"we can find a category with english slug whose parent slug is CJK"
);
-
- sinon.restore();
});
test("findSingleBySlug", function (assert) {
@@ -368,8 +366,6 @@ module("Unit | Model | category", function () {
[child_category1, category2, read_restricted_category],
"prioritize non read_restricted with limit"
);
-
- sinon.restore();
});
test("search with category slug", function (assert) {