mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix tests
This commit is contained in:
parent
1a17d08df6
commit
4f8ddec025
@ -1,10 +1,33 @@
|
||||
import { ApolloClient, ApolloLink, InMemoryCache, HttpLink } from 'apollo-boost'
|
||||
import './main'
|
||||
import CONFIG from './config'
|
||||
|
||||
jest.mock('apollo-boost')
|
||||
jest.mock('apollo-boost', () => {
|
||||
return {
|
||||
__esModule: true,
|
||||
ApolloClient: jest.fn(),
|
||||
ApolloLink: jest.fn(() => {
|
||||
return { concat: jest.fn() }
|
||||
}),
|
||||
InMemoryCache: jest.fn(),
|
||||
HttpLink: jest.fn(),
|
||||
}
|
||||
})
|
||||
|
||||
describe('main', () => {
|
||||
it('is there', () => {
|
||||
expect(true).toBeTruthy()
|
||||
it('calls the HttpLink', () => {
|
||||
expect(HttpLink).toBeCalledWith({ uri: CONFIG.GRAPHQL_URI })
|
||||
})
|
||||
|
||||
it('calls the ApolloLink', () => {
|
||||
expect(ApolloLink).toBeCalled()
|
||||
})
|
||||
|
||||
it('calls the ApolloClient', () => {
|
||||
expect(ApolloClient).toBeCalled()
|
||||
})
|
||||
|
||||
it('calls the InMemoryCache', () => {
|
||||
expect(InMemoryCache).toBeCalled()
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user