Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

add a test that doesn't pass an exception
  • Loading branch information...
commit b90c18de6df28ee4753217d9294a05dc8020afb0 2 parents bd84172 + ba41335
@tj tj 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.