mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
cleaned test helpers
This commit is contained in:
parent
7d54896801
commit
6a7dac0cc6
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
import { createTestClient } from 'apollo-server-testing'
|
import { createTestClient } from 'apollo-server-testing'
|
||||||
import createServer from '../src/server/createServer'
|
import createServer from '../src/server/createServer'
|
||||||
import { initialize } from '@dbTools/helpers'
|
|
||||||
import { entities } from '@entity/index'
|
import { entities } from '@entity/index'
|
||||||
import { i18n, logger } from './testSetup'
|
import { i18n, logger } from './testSetup'
|
||||||
|
|
||||||
@ -33,7 +32,6 @@ export const testEnvironment = async (testLogger: any = logger, testI18n: any =
|
|||||||
const testClient = createTestClient(server.apollo)
|
const testClient = createTestClient(server.apollo)
|
||||||
const mutate = testClient.mutate
|
const mutate = testClient.mutate
|
||||||
const query = testClient.query
|
const query = testClient.query
|
||||||
await initialize()
|
|
||||||
return { mutate, query, con }
|
return { mutate, query, con }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
import CONFIG from '@/config'
|
import CONFIG from '@/config'
|
||||||
import connection from '@/typeorm/connection'
|
import connection from '@/typeorm/connection'
|
||||||
import { checkDBVersion } from '@/typeorm/DBVersion'
|
import { checkDBVersion } from '@/typeorm/DBVersion'
|
||||||
import { initialize } from '@dbTools/helpers'
|
|
||||||
import { entities } from '@entity/index'
|
import { entities } from '@entity/index'
|
||||||
import { logger } from './testSetup'
|
import { logger } from './testSetup'
|
||||||
|
|
||||||
@ -42,7 +41,6 @@ export const testEnvironment = async () => {
|
|||||||
logger.fatal('Fatal: Database Version incorrect')
|
logger.fatal('Fatal: Database Version incorrect')
|
||||||
throw new Error('Fatal: Database Version incorrect')
|
throw new Error('Fatal: Database Version incorrect')
|
||||||
}
|
}
|
||||||
await initialize()
|
|
||||||
return { con }
|
return { con }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user