Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #105 test error, fetch requires absolute urls #106

Merged
merged 2 commits into from
Oct 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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