mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-01 12:03:08 +00:00
Bug 584611 Improve test detection for mochitest r=jmaher a=NPOTB
This commit is contained in:
parent
458c94b78f
commit
89c6dc31ed
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user