Typescript + Karma + Fetch Mock

320 Views Asked by At

Trying to import fetch mock but when karma starts I get:

You need to include some adapter that implements karma.start method!

I've tried all of these with no success:

import {fetchMock} from 'fetch-mock'; import fetchMock from 'fetch-mock'; import fetchMock from 'fetch-mock';

I have installed the typings from @types/fetch-mock

1

There are 1 best solutions below

1
rgwozdz On

Try:

import * as fetchMock from 'fetch-mock';