Explorar o código

Include snake_case named tests

Alasdair Smith %!s(int64=8) %!d(string=hai) anos
pai
achega
d524249fc8
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      services/web/test/unit_frontend/coffee/test-main.coffee

+ 3 - 2
services/web/test/unit_frontend/coffee/test-main.coffee

@@ -1,9 +1,10 @@
 # Set up requirejs to load the tests
-# Uses heuristic that test filenames end with Tests.js
+# Uses heuristic that test filenames end with Tests.js (existing frontend code)
+# or _tests.js (newer frontend code)
 tests = []
 for file of window.__karma__.files
   if window.__karma__.files.hasOwnProperty(file)
-    if /test\/unit_frontend\/js.+Tests.js$/.test(file)
+    if /test\/unit_frontend\/js.+(_t|T)ests\.js$/.test(file)
       tests.push(file)
 
 requirejs.config