import fetchMock from 'fetch-mock';

import { SPADE_ROTATOR_URI } from 'mweb/common/config/spadeRotator';

export const SPADE_TEST_URI = '//somewhere.over.the.rainbow';

export function mockSpadeRotator(): void {
  fetchMock.mock(SPADE_ROTATOR_URI, { body: SPADE_TEST_URI });
}

export function mockSpadeRotatorError(): void {
  fetchMock.mock(SPADE_ROTATOR_URI, 500);
}
