@@ -5,11 +5,6 @@ import 'isomorphic-fetch';
55// Dependencies
66import sinon from 'sinon' ;
77import chai from 'chai' ;
8- import fetchMock from 'fetch-mock' ;
9- import chaiFetchMock from 'chai-fetch-mock' ;
10-
11- // Plugins
12- chai . use ( chaiFetchMock ) ;
138
149// Interface
1510const { expect } = chai ;
@@ -34,8 +29,6 @@ describe('Highway.Core', () => {
3429 document . body . appendChild ( a ) ;
3530 document . body . appendChild ( b ) ;
3631
37- before ( ( ) => fetchMock . get ( '/foo' , 'bar' ) ) ;
38-
3932 it ( 'Should be an instance of `Highway.Core`' , ( ) => {
4033 const Core = new Highway . Core ( ) ;
4134
@@ -101,21 +94,9 @@ describe('Highway.Core', () => {
10194 const Core = new Highway . Core ( ) ;
10295
10396 Core . unbind = sinon . spy ( ) ;
97+ Core . state = { url : 'http://bar.com/foo' } ;
10498 Core . beforeFetch ( ) ;
10599
106100 expect ( Core . unbind . calledOnce ) . to . be . true ;
107101 } ) ;
108-
109- // it('Should fetch an URL properly', () => {
110- // const Core = new Highway.Core();
111-
112- // Core.state = { url: '/foo' };
113-
114- // Core.fetch().then((response) => {
115- // expect(response).to.equal('bar');
116- // expect(fetchMock).route('/foo').to.have.been.called;
117- // });
118- // });
119-
120- after ( ( ) => fetchMock . restore ( ) ) ;
121102} ) ;
0 commit comments