UNPKG

@elastic-suite/gally-admin-shared

Version:
13 lines (10 loc) 332 B
import { isError } from './network' jest.mock('../services/storage') describe('Network service', () => { describe('isError', () => { it('should check if response is a fetch error', () => { expect(isError({ error: 'Unauthorized' })).toEqual(true) expect(isError({ hello: 'world' })).toEqual(false) }) }) })