Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Range tests

  • Loading branch information...
commit e067641b0c7a1e7a2697590e55e4a264b736b56e 1 parent f36abf5
TJ Holowaychuk tj authored
Showing with 17 additions and 0 deletions.
  1. +1 −0  test/fixtures/nums
  2. +16 −0 test/static.js
1  test/fixtures/nums
View
@@ -0,0 +1 @@
+123456789
16 test/static.js
View
@@ -105,6 +105,22 @@ describe('connect.static()', function(){
})
})
+ describe('Range', function(){
+ it('should support byte ranges', function(done){
+ app.request()
+ .get('/nums')
+ .set('Range', 'bytes=0-4')
+ .expect('12345', done);
+ })
+
+ it('should respond with 206 "Partial Content"', function(done){
+ app.request()
+ .get('/nums')
+ .set('Range', 'bytes=0-4')
+ .expect(206, done);
+ })
+ })
+
// TODO: node bug
// describe('on ENAMETOOLONG', function(){
// it('should next()', function(done){
Please sign in to comment.
Something went wrong with that request. Please try again.