How to use the get function from supertest

Find comprehensive JavaScript supertest.get code examples handpicked from public code repositorys.

240
241
242
243
244
245
246
247
248
249
describe('handshake', function(){
  var request = require('superagent');

  it('should disallow request when origin defined and none specified', function(done) {
    var sockets = io({ origins: 'http://foo.example:*' }).listen('54013');
    request.get('http://localhost:54013/socket.io/default/')
     .query({ transport: 'polling' })
     .end(function (err, res) {
        expect(res.status).to.be(403);
        done();
fork icon0
star icon0
watch icon1

+ 9 other calls in file