From c6a373d24ded3981beb8f1eacd0641319d32911a Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 7 Oct 2021 19:46:42 +0200 Subject: [PATCH] pass CI tests --- .github/workflows/test.yml | 2 +- .../src/graphql/resolver/CommunityResolver.test.ts | 6 ++++-- backend/src/test-server.ts | 11 +++++++---- frontend/src/routes/router.test.js | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3687cc5a..bb6da5bb8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} ############################################################################## diff --git a/backend/src/graphql/resolver/CommunityResolver.test.ts b/backend/src/graphql/resolver/CommunityResolver.test.ts index fdc161a49..34a6b81aa 100644 --- a/backend/src/graphql/resolver/CommunityResolver.test.ts +++ b/backend/src/graphql/resolver/CommunityResolver.test.ts @@ -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 { diff --git a/backend/src/test-server.ts b/backend/src/test-server.ts index 7e75651da..4a0e75342 100644 --- a/backend/src/test-server.ts +++ b/backend/src/test-server.ts @@ -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 => { // 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 }) diff --git a/frontend/src/routes/router.test.js b/frontend/src/routes/router.test.js index 57fca142b..7ea6e367a 100644 --- a/frontend/src/routes/router.test.js +++ b/frontend/src/routes/router.test.js @@ -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', () => {