var path = require('path');
var spawn = require('child_process').spawn;
var fs = require('fs');
var path = require('path');
var chai = require('chai');

chai.use(require('chai-fs'));
chai.should();

const ROOT_DIR = path.join(process.cwd(), '..');

describe('As a dev', function() {

    this.timeout(10000);

    describe('When running `gulp release --prod`', function() {

        before(function(done) {

            process.chdir(ROOT_DIR);

            var gulp = spawn('gulp', ['release', '--prod'])

            gulp.on('close', function() {
                done();
            });
        });

        it('the release folder should exist', function() {
            var pathToTest = path.join(ROOT_DIR, 'release');
            pathToTest.should.be.a.directory().and.not.empty;
        });

        it('the release folder should contain atleast one zip file', function() {
            var pathToTest = path.join(ROOT_DIR, 'release/');
            var directoryFileName = fs.readdirSync(pathToTest);
            var actualFileExtName = path.extname(directoryFileName);
            var expectedFileExtName = '.zip';

            actualFileExtName.should.equal(expectedFileExtName);
        });

    });

});
@@ -1201,11 +1201,499 @@
    %7D);%0A%0A
+    describe('When running %60gulp build --prod%60', function() %7B%0A%0A        before(function(done) %7B%0A%0A            process.chdir(ROOT_DIR);%0A%0A            var gulp = spawn('gulp', %5B'build', '--prod'%5D)%0A%0A            gulp.on('close', function() %7B%0A                done();%0A            %7D);%0A        %7D);%0A%0A        it('the build folder should exist', function() %7B%0A            var pathToTest = path.join(ROOT_DIR, 'build');%0A            pathToTest.should.be.a.directory().and.not.empty;%0A        %7D);%0A%0A    %7D);%0A%0A
 %7D);

Add test for gulp build to check if build folder is created