Commit f0881ae1 by Marcin Cieślak

Merge branch 'dirtestfix'

parents 17cfde32 9a2536f6
...@@ -8,4 +8,6 @@ vendor ...@@ -8,4 +8,6 @@ vendor
test/html-report test/html-report
test/lcov-report test/lcov-report
test/lcov.info test/lcov.info
test/fixtures/watching-css-out-01
test/fixtures/watching-css-out-02
coverage coverage
...@@ -346,9 +346,11 @@ describe('cli', function() { ...@@ -346,9 +346,11 @@ describe('cli', function() {
fs.appendFileSync(foo, 'body\n\tbackground: white\n'); fs.appendFileSync(foo, 'body\n\tbackground: white\n');
}, 500); }, 500);
}); });
});
describe('node-sass --output directory', function() {
it('should watch whole directory', function(done) { it('should watch whole directory', function(done) {
var destDir = fixture('watching-css-out/'); var destDir = fixture('watching-css-out-01/');
var srcDir = fixture('watching-dir/'); var srcDir = fixture('watching-dir/');
var srcFile = path.join(srcDir, 'index.scss'); var srcFile = path.join(srcDir, 'index.scss');
...@@ -366,14 +368,13 @@ describe('cli', function() { ...@@ -366,14 +368,13 @@ describe('cli', function() {
bin.kill(); bin.kill();
var files = fs.readdirSync(destDir); var files = fs.readdirSync(destDir);
assert.deepEqual(files, ['index.css']); assert.deepEqual(files, ['index.css']);
rimraf.sync(destDir); rimraf(destDir, done);
done();
}, 200); }, 200);
}, 500); }, 500);
}); });
it('should compile all changed files in watched directory', function(done) { it('should compile all changed files in watched directory', function(done) {
var destDir = fixture('watching-css-out/'); var destDir = fixture('watching-css-out-02/');
var srcDir = fixture('watching/'); var srcDir = fixture('watching/');
var srcFile = path.join(srcDir, 'foo.scss'); var srcFile = path.join(srcDir, 'foo.scss');
...@@ -391,8 +392,7 @@ describe('cli', function() { ...@@ -391,8 +392,7 @@ describe('cli', function() {
bin.kill(); bin.kill();
var files = fs.readdirSync(destDir); var files = fs.readdirSync(destDir);
assert.deepEqual(files, ['foo.css', 'index.css']); assert.deepEqual(files, ['foo.css', 'index.css']);
rimraf.sync(destDir); rimraf(destDir, done);
done();
}, 200); }, 200);
}, 500); }, 500);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment