11var http = require ( 'http' ) ;
22var url = require ( 'url' ) ;
33
4- var chai = require ( 'chai' ) ;
5- var chaiSubset = require ( 'chai-subset' ) ;
4+ var expect = require ( 'chai' ) . expect ;
65var nock = require ( 'nock' ) ;
7- var sinon = require ( 'sinon' ) ;
8- var sinonChai = require ( 'sinon-chai' ) ;
96
107var Shimmer = require ( './shimmer' ) ;
118var wrapper = require ( './http.request' ) ;
129
13- chai . use ( chaiSubset ) ;
14- chai . use ( sinonChai ) ;
15-
16- var expect = chai . expect ;
1710var dummyCollector = {
1811 emit : function ( ) { } ,
1912 getService : function ( ) {
2013 return 1 ;
2114 }
2215} ;
23- var sandbox ;
2416
2517describe ( 'The wrapper module' , function ( ) {
2618 before ( function ( ) {
@@ -37,14 +29,6 @@ describe('The wrapper module', function () {
3729 } ) ;
3830 } ) ;
3931
40- beforeEach ( function ( ) {
41- sandbox = sinon . sandbox . create ( ) ;
42- } ) ;
43-
44- afterEach ( function ( ) {
45- sandbox . restore ( ) ;
46- } ) ;
47-
4832 describe ( 'skips every whitelisted hosts' , function ( ) {
4933 it ( 'wraps the HTTP.request(options) method' , function ( ) {
5034 nock ( 'http://localhost:8000' )
@@ -64,7 +48,7 @@ describe('The wrapper module', function () {
6448 } ) ;
6549
6650 it ( 'wraps the HTTP.get(urlString) method' , function ( ) {
67- var urlParseSpy = sandbox . spy ( url , 'parse' ) ;
51+ var urlParseSpy = this . sandbox . spy ( url , 'parse' ) ;
6852
6953 nock ( 'http://localhost:8000' )
7054 . get ( '/' )
@@ -99,7 +83,7 @@ describe('The wrapper module', function () {
9983 } ) ;
10084
10185 it ( 'wraps the HTTP.get(urlString) method' , function ( ) {
102- var urlParseSpy = sandbox . spy ( url , 'parse' ) ;
86+ var urlParseSpy = this . sandbox . spy ( url , 'parse' ) ;
10387
10488 nock ( 'http://non-whitelisted:8000' )
10589 . get ( '/' )
0 commit comments