mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
pass CI tests
This commit is contained in:
parent
d8265b0c27
commit
c6a373d24d
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -386,7 +386,7 @@ jobs:
|
||||
report_name: Coverage Backend
|
||||
type: lcov
|
||||
result_path: ./coverage/lcov.info
|
||||
min_coverage: 4
|
||||
min_coverage: 46
|
||||
token: ${{ github.token }}
|
||||
|
||||
##############################################################################
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
|
||||
import { createTestClient } from 'apollo-server-testing'
|
||||
import createTestServer from '../../test-server'
|
||||
|
||||
@ -8,9 +11,8 @@ beforeAll(async () => {
|
||||
|
||||
query = createTestClient(await apollo).query
|
||||
})
|
||||
|
||||
describe('CommunityResolver', () => {
|
||||
|
||||
describe('CommunityResolver', () => {
|
||||
const getCommunityInfoQuery = `
|
||||
query {
|
||||
getCommunityInfo {
|
||||
|
||||
@ -1,25 +1,28 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
|
||||
import { ApolloServer } from 'apollo-server-express'
|
||||
import express from 'express'
|
||||
import cors from './server/cors'
|
||||
import context from './server/context'
|
||||
// import context from './server/context'
|
||||
import plugins from './server/plugins'
|
||||
import CONFIG from './config'
|
||||
|
||||
// graphql
|
||||
import schema from './graphql/schema'
|
||||
|
||||
const createTestServer = async () => {
|
||||
const createTestServer = async (): Promise<any> => {
|
||||
// Express Server
|
||||
const server = express()
|
||||
|
||||
// cors
|
||||
server.use(cors)
|
||||
|
||||
|
||||
// Apollo Server
|
||||
const apollo = new ApolloServer({
|
||||
schema: await schema(),
|
||||
playground: CONFIG.GRAPHIQL,
|
||||
// context,
|
||||
// context,
|
||||
plugins,
|
||||
})
|
||||
apollo.applyMiddleware({ app: server })
|
||||
|
||||
@ -55,8 +55,8 @@ describe('router', () => {
|
||||
expect(routes.find((r) => r.path === '/').redirect()).toEqual({ path: '/login' })
|
||||
})
|
||||
|
||||
it('has ten routes defined', () => {
|
||||
expect(routes).toHaveLength(10)
|
||||
it('has 12 routes defined', () => {
|
||||
expect(routes).toHaveLength(12)
|
||||
})
|
||||
|
||||
describe('overview', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user