Skip to content

Commit

Permalink
Add timeout to failing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Curtis committed Dec 5, 2016
1 parent 50541da commit 592dd10
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions test/yaml.laptop.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,17 @@ describe('Monitor modification on yaml files', function() {
});

it('test file monitor after change', function(done) {
var payload = 'hello world';
request
.put('/laptop/yaml/monitor')
.type('text/plain')
.send(payload)
.end(function(err, res) {
assert(!err, 'Unexpected error with context unit tests');
assert.deepEqual(res.text, 'hello world');
done();
});
setTimeout(function() {
var payload = 'hello world';
request
.put('/laptop/yaml/monitor')
.type('text/plain')
.send(payload)
.end(function(err, res) {
assert(!err, 'Unexpected error with context unit tests');
assert.deepEqual(res.text, 'hello world');
done();
});
}, 10000);
});
});

0 comments on commit 592dd10

Please sign in to comment.