Skip to content
Myr

fixed a test race condition

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 1248f03 · Browse files · 1 file+3 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−6 removed

  • tests:+3 added−6 removed

1 file+3 added−6 removed

modified:test/res.sendfile.js+3 added-6 removed
4 unmodified lines
56describe('res', function(){7 describe('.sendfile(path, fn)', function(){8 it('should invoke the callback when complete', function(done){9 var app = express()10 , calls = 0;9 var app = express();1011 app.use(function(req, res){12 res.sendfile('test/fixtures/user.html', function(err){13 assert(!err);15 ++calls;14 done();15 });16 });1718 request(app)19 .get('/')20 .end(function(res){22 calls.should.equal(1);23 res.statusCode.should.equal(200);24 done();21 res.should.have.status(200);22 });23 })2425 it('should utilize the same options as express.static()', function(done){
216 unmodified lines