Permalink
Browse files

Merge pull request #38 from fengmk2/testcase-for-issue37

add a test that doesn't pass an exception
  • Loading branch information...
2 parents bd84172 + ba41335 commit b90c18de6df28ee4753217d9294a05dc8020afb0 @tj tj committed Nov 28, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/supertest.js
View
@@ -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(){

0 comments on commit b90c18d

Please sign in to comment.