server: fix server throwing when fixturesFolder is false

This commit is contained in:
Chris Breiding
2017-07-07 16:30:08 -04:00
parent c13a14fe2d
commit 036cc22070
2 changed files with 15 additions and 10 deletions

View File

@@ -111,11 +111,12 @@ module.exports = {
## coded. the rest is simply whatever is in
## the javascripts array
fixturesFolderPath = path.join(
config.fixturesFolder,
"**",
"*"
)
if config.fixturesFolder
fixturesFolderPath = path.join(
config.fixturesFolder,
"**",
"*"
)
supportFilePath = config.supportFile or []
@@ -123,7 +124,7 @@ module.exports = {
## TODO: think about moving this into config
## and mapping each of the javascripts into an
## absolute path
javascriptsPath = _.map config.javascripts, (js) ->
javascriptsPaths = _.map config.javascripts, (js) ->
path.join(config.projectRoot, js)
## ignore fixtures + javascripts
@@ -131,11 +132,11 @@ module.exports = {
sort: true
absolute: true
cwd: integrationFolderPath
ignore: [].concat(
javascriptsPath,
supportFilePath,
ignore: _.compact(_.flatten([
javascriptsPaths
supportFilePath
fixturesFolderPath
)
]))
}
## filePath = /Users/bmann/Dev/my-project/cypress/integration/foo.coffee

View File

@@ -36,6 +36,10 @@ describe "lib/controllers/files", ->
.then (R.prop("integration"))
.then (R.forEach(checkFoundSpec))
it "handles fixturesFolder being false", ->
@config.fixturesFolder = false
expect(=> filesController.getTestFiles(@config)).not.to.throw()
describe "lib/files", ->
beforeEach ->
FixturesHelper.scaffold()