Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more range tests

  • Loading branch information...
commit a8a4f6f7c092da42475d42f0e841a21042c1343f 1 parent 79f9e72
@tj tj authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/static.js
View
14 test/static.js
@@ -126,7 +126,21 @@ describe('connect.static()', function(){
.set('Range', 'bytes=2-5')
.expect('Content-Range', 'bytes 2-5/9', done);
})
+
+ it('should support -n', function(done){
+ app.request()
+ .get('/nums')
+ .set('Range', 'bytes=-3')
+ .expect('789', done);
+ })
+ it('should support n-', function(done){
+ app.request()
+ .get('/nums')
+ .set('Range', 'bytes=3-')
+ .expect('456789', done);
+ })
+
it('should respond with 206 "Partial Content"', function(done){
app.request()
.get('/nums')
Please sign in to comment.
Something went wrong with that request. Please try again.