Fix the build. Remove the branch value if available.

Fix the build. Remove the branch value if available.

48d690ae01e6a65c2c5ac7995b7e0b8a741599c2

diff --git a/test/javascripts/admin/controllers/admin-customize-themes-show-test.js.es6 b/test/javascripts/admin/controllers/admin-customize-themes-show-test.js.es6
index 10cc642..3e9c0f9 100644
--- a/test/javascripts/admin/controllers/admin-customize-themes-show-test.js.es6
+++ b/test/javascripts/admin/controllers/admin-customize-themes-show-test.js.es6
@@ -19,6 +19,7 @@ const remoteTheme = Theme.create({
 });
 
 QUnit.test("can display source url for remote themes", function(assert) {
+  delete remoteTheme["remote_theme"]["branch"];
   const controller = this.subject({
     model: remoteTheme
   });

GitHub sha: 45ce9876

This is a bit odd to me because you are removing state from outside the function.

I think this code would be less error prone if instead of making remoteTheme a variable in this module which is re-used between tests, instead each test created its own remoteTheme variable local to the test itself.

Our lives will be a lot easier if we don’t have to worry about data leaking between tests like this.

1 Like

Follow up in https://review.discourse.org/t/make-qunit-test-code-more-clean/10024