Permalink
Browse files

Test a second change is picked up by fs.watch

  • Loading branch information...
1 parent 294847a commit 9ca55ab97077aba5ae001dd554100764f09789b2 @chriso chriso committed Mar 20, 2013
Showing with 18 additions and 6 deletions.
  1. +18 −6 test/server.js
View
24 test/server.js
@@ -199,11 +199,17 @@ describe('Server', function () {
assert.equal(body, 'p {\n color: green;\n}\nbody {\n color: red;\n}\n');
fs.writeFile(__dirname + '/data/srv11/public/css/foo/test.less'
, 'p { color: blue; }\n', function () {
- close(url);
- done();
+ setTimeout(function () {
+ request(url + 'css/style.css', function (err, res, body) {
+ assert(!err, err);
+ assert.equal(body, 'p {\n color: blue;\n}\nbody {\n color: red;\n}\n');
+ close(url);
+ done();
+ });
+ }, 100);
});
});
- }, 500);
+ }, 100);
});
});
});
@@ -226,11 +232,17 @@ describe('Server', function () {
assert.equal(body, 'var bar = 23\n');
fs.writeFile(__dirname + '/data/srv12/public/js/script.js'
, 'var foo = 1\n', function () {
- close(url);
- done();
+ setTimeout(function () {
+ request(url + 'js/script.js', function (err, res, body) {
+ assert(!err, err);
+ assert.equal(body, 'var foo = 1\n');
+ close(url);
+ done();
+ });
+ }, 100);
});
});
- }, 500);
+ }, 100);
});
});
});

0 comments on commit 9ca55ab

Please sign in to comment.