Skip to content

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

DEV: Ensure theme tests are always loaded in a consistent order (#16569)

David Taylor5e34ce12821d
diff --git a/app/models/theme.rb b/app/models/theme.rb
index 990b39c1e85..596db2e2b2f 100644
--- a/app/models/theme.rb
+++ b/app/models/theme.rb
@@ -707,6 +707,7 @@ class Theme < ActiveRecord::Base
def baked_js_tests_with_digest
content = theme_fields
.where(target_id: Theme.targets[:tests_js])
+ .order(name: :asc)
.each(&:ensure_baked!)
.map(&:value_baked)
.join("\n")