pass CI tests

This commit is contained in:
Moriz Wahl 2021-10-07 19:46:42 +02:00
parent d8265b0c27
commit c6a373d24d
4 changed files with 14 additions and 9 deletions

View File

@ -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 }}
##############################################################################

View File

@ -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 {

View File

@ -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 })

View File

@ -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', () => {