Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add a test that doesn't pass an exception

  • Loading branch information...
commit ba41335ad0fee69aa4a2953bc4e9eaee0ac30c66 1 parent bd84172
@fengmk2 fengmk2 authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/supertest.js
View
14 test/supertest.js
@@ -257,6 +257,20 @@ describe('request(app)', function(){
done();
});
})
+
+ it('should assert response body multiple times with no exception', function(done){
+ var app = express();
+
+ app.get('/', function(req, res){
+ res.send('hey tj');
+ });
+
+ request(app)
+ .get('/')
+ .expect(/tj/)
+ .expect(/^hey/)
+ .expect('hey tj', done);
+ })
})
describe('.expect(field, value[, fn])', function(){
Please sign in to comment.
Something went wrong with that request. Please try again.