Skip to content

Commit

Permalink
Test runner should clean up after itself
Browse files Browse the repository at this point in the history
We don't remove generated files between tests which results in
false positives when asserting if a file was created. This was
noticed when creating the test cases for dlmanning#358
  • Loading branch information
xzyfer committed Oct 5, 2015
1 parent 04f9a93 commit 0fdee92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"gulp-sourcemaps": "^1.5.2",
"gulp-tap": "^0.1.3",
"mocha": "^2.2.1",
"should": "^5.2.0"
"rimraf": "^2.4.3",
"should": "^7.0.0"
}
}
9 changes: 9 additions & 0 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var gutil = require('gulp-util');
var path = require('path');
var fs = require('fs');
var sass = require('../index');
var rimraf = require('rimraf');
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var postcss = require('gulp-postcss');
Expand All @@ -25,6 +26,10 @@ var createVinyl = function createVinyl(filename, contents) {
};

describe('gulp-sass -- async compile', function() {
beforeEach(function(done) {
rimraf(path.join(__dirname, '/results/'), done);
});

it('should pass file when it isNull()', function(done) {
var stream = sass();
var emptyFile = {
Expand Down Expand Up @@ -257,6 +262,10 @@ describe('gulp-sass -- async compile', function() {
});

describe('gulp-sass -- sync compile', function() {
beforeEach(function(done) {
rimraf(path.join(__dirname, '/results/'), done);
});

it('should pass file when it isNull()', function(done) {
var stream = sass.sync();
var emptyFile = {
Expand Down

0 comments on commit 0fdee92

Please sign in to comment.