зеркало из https://github.com/mozilla/pjs.git
Bug 584611 Improve test detection for mochitest r=jmaher a=NPOTB
This commit is contained in:
Родитель
db0824c44e
Коммит
67a3b8660c
|
@ -458,7 +458,12 @@ function isTest(filename, pattern)
|
|||
if (pattern)
|
||||
return pattern.test(filename);
|
||||
|
||||
return filename.indexOf("test_") > -1 &&
|
||||
// File name is a URL style path to a test file, make sure that we check for
|
||||
// tests that start with test_.
|
||||
testPattern = /^test_/;
|
||||
pathPieces = filename.split('/');
|
||||
|
||||
return testPattern.test(pathPieces[pathPieces.length - 1]) &&
|
||||
filename.indexOf(".js") == -1 &&
|
||||
filename.indexOf(".css") == -1 &&
|
||||
!/\^headers\^$/.test(filename);
|
||||
|
|
Загрузка…
Ссылка в новой задаче