Skip to content

Commit

Permalink
Merge pull request #106 from jaegertracing/issue-105-test-error-absol…
Browse files Browse the repository at this point in the history
…ute-urls

Fix #105 test error, fetch requires absolute urls
  • Loading branch information
tiffon authored Oct 25, 2017
2 parents 534d81c + fd95c0c commit 4ece4e6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/actions/jaeger-api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.

/* eslint-disable import/first */
jest.mock('node-fetch', () => () =>
Promise.resolve({
status: 200,
data: () => Promise.resolve({ data: null }),
json: () => Promise.resolve({ data: null }),
})
);

import sinon from 'sinon';
import isPromise from 'is-promise';

import JaegerAPI from '../api/jaeger';

import * as jaegerApiActions from './jaeger-api';
import JaegerAPI from '../api/jaeger';

it('@JAEGER_API/FETCH_TRACE should fetch the trace by id', () => {
const api = JaegerAPI;
Expand Down
12 changes: 11 additions & 1 deletion src/middlewares/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import sinon from 'sinon';
/* eslint-disable import/first */
jest.mock('node-fetch', () => () =>
Promise.resolve({
status: 200,
data: () => Promise.resolve({ data: null }),
json: () => Promise.resolve({ data: null }),
})
);

import { change } from 'redux-form';
import sinon from 'sinon';

import * as jaegerMiddlewares from './index';
import { fetchServiceOperations } from '../actions/jaeger-api';

Expand Down

0 comments on commit 4ece4e6

Please sign in to comment.