driver: only try to match spec files for src files

This commit is contained in:
Chris Breiding
2017-05-19 15:53:23 -04:00
parent 1692a7d394
commit d30b74fa8f

View File

@@ -56,8 +56,14 @@ specRunnerOptions = {
server = { runSpec: -> }
srcDir = path.join(__dirname, "src")
testDir = path.join(__dirname, "test")
matchingSpecFile = (filePath) ->
specPath = filePath.replace(path.join(__dirname, "src"), path.join(__dirname, "test/unit"))
## only files in src/ having matching spec files
return false if not _.includes(filePath, srcDir)
specPath = filePath.replace(srcDir, path.join(__dirname, "test/unit"))
specPath = specPath.replace(".coffee", "_spec.coffee")
try
fs.statSync(specPath)