Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Reduce race conditons in watcher tests
Browse files Browse the repository at this point in the history
We are getting test failures:

1) cli node-sass in.scss should watch the full scss dep tree for a single file:

      Uncaught AssertionError: false == true

      + expected - actual

      -false

      +true

      at Socket.<anonymous> (test/cli.js:317:9)
      at readableAddChunk (_stream_readable.js:146:16)
      at Socket.Readable.push (_stream_readable.js:110:10)
      at Pipe.onread (net.js:523:20)
  • Loading branch information
saper committed Sep 16, 2015
1 parent d43ab63 commit 16a6d70
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ describe('cli', function() {

it('should watch the full scss dep tree for a single file', function(done) {
var src = fixture('watching/index.scss');
var foo = fixture('watching/foo.scss');
var foo = fixture('watching/white.scss');

fs.writeFileSync(foo, '');

Expand Down Expand Up @@ -351,7 +351,7 @@ describe('cli', function() {
describe('node-sass --output directory', function() {
it('should watch whole directory', function(done) {
var destDir = fixture('watching-css-out-01/');
var srcDir = fixture('watching-dir/');
var srcDir = fixture('watching-dir-01/');
var srcFile = path.join(srcDir, 'index.scss');

fs.writeFileSync(srcFile, '');
Expand All @@ -375,7 +375,7 @@ describe('cli', function() {

it('should compile all changed files in watched directory', function(done) {
var destDir = fixture('watching-css-out-02/');
var srcDir = fixture('watching/');
var srcDir = fixture('watching-dir-02/');
var srcFile = path.join(srcDir, 'foo.scss');

fs.writeFileSync(srcFile, '');
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions test/fixtures/watching-dir-02/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './foo';
2 changes: 1 addition & 1 deletion test/fixtures/watching/index.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import './foo';
@import './white';
1 change: 1 addition & 0 deletions test/fixtures/watching/white.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
body{background:white}

0 comments on commit 16a6d70

Please sign in to comment.