Run specs from all package directory paths

This commit is contained in:
Kevin Sawicki & Nathan Sobo
2013-01-10 15:30:56 -08:00
parent e76d6808b7
commit 80c506340f

View File

@@ -1,11 +1,13 @@
fs = require 'fs'
require 'spec-helper'
# Run core specs
for path in fs.listTree(require.resolve("spec")) when /-spec\.coffee$/.test path
require path
# Run extension specs
for packagePath in fs.listTree(require.resolve("src/packages"))
for path in fs.listTree(fs.join(packagePath, "spec")) when /-spec\.coffee$/.test path
require path
for packageDirPath in config.packageDirPaths
for packagePath in fs.listTree(packageDirPath)
for path in fs.listTree(fs.join(packagePath, "spec")) when /-spec\.coffee$/.test path
require path