tatsuyafw / gulp-nightwatch

gulp plugin for Nightwatch.js
MIT License
30 stars 18 forks source link

Support running multiple test files in series #59

Open alowayed opened 5 years ago

alowayed commented 5 years ago

I need to run multiple test files but get an error on line 15 of background.js:

Path must be a string. Received [ 'test1.js', 'test2.js' ]

My gulp task looks something like this:

gulp.src('')
    .pipe(nightwatch({
        configFile: nightWatchConfigPath,
        cliArgs: [
            '--config configPath.json'
            '--test test1.js',
            '--test test1.js',
            '--env chrome'
        ]
    }))

Seems both tests are being concatenated into an array.

dgateles commented 5 years ago

You need to configure configFile with:

src_folders: [
        // Folders with tests
        'test_fixtures'
    ],

And nightwatch read all tests files inside this folder.