mock-gulp-dest
Mock gulp.dest/vinyl-fs.dest for testing purposes. Useful when writing slush generators.
Installation
npm install --save mock-gulp-dest
Usage
Within your test do:
var gulp = mockGulpDest = gulp; // Load all slush generator tasks:; ;
API
cwd()
Returns String
Get current working directory that gulp.dest
uses, i.e. either process.cwd()
or set with gulp.dest(folder, {cwd: newCwd})
.
basePath()
Returns String
Get base path that gulp.dest
uses, i.e. cwd() + gulp.dest folder
.
assertDestContains(filePath)
Param String|Array|Object
filePath
Assert that gulp.dest
will create given file(s). See example usage above.
assertDestNotContains(filePath)
Param String|Array|Object
filePath
Assert that gulp.dest
will not create given file(s). Used in the same way as assertDestContains()
.
License
MIT