mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
lint fixes
This commit is contained in:
parent
ecb99bd603
commit
7b2e6730bd
@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
|
||||||
import Decimal from 'decimal.js-light'
|
import Decimal from 'decimal.js-light'
|
||||||
import { logger } from '@test/testSetup'
|
import { logger } from '@test/testSetup'
|
||||||
import { GraphQLError } from 'graphql'
|
import { GraphQLError } from 'graphql'
|
||||||
@ -11,15 +13,12 @@ import { listContributionLinks } from '@/seeds/graphql/queries'
|
|||||||
import { cleanDB, testEnvironment, resetToken } from '@test/helpers'
|
import { cleanDB, testEnvironment, resetToken } from '@test/helpers'
|
||||||
import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
|
import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
|
||||||
import { peterLustig } from '@/seeds/users/peter-lustig'
|
import { peterLustig } from '@/seeds/users/peter-lustig'
|
||||||
import { User } from '@entity/User'
|
|
||||||
import { userFactory } from '@/seeds/factory/user'
|
import { userFactory } from '@/seeds/factory/user'
|
||||||
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
||||||
|
|
||||||
let mutate: any, query: any, con: any
|
let mutate: any, query: any, con: any
|
||||||
let testEnv: any
|
let testEnv: any
|
||||||
|
|
||||||
let user: User
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
testEnv = await testEnvironment()
|
testEnv = await testEnvironment()
|
||||||
mutate = testEnv.mutate
|
mutate = testEnv.mutate
|
||||||
@ -185,7 +184,7 @@ describe('Contribution Links', () => {
|
|||||||
|
|
||||||
describe('with admin rights', () => {
|
describe('with admin rights', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
user = await userFactory(testEnv, peterLustig)
|
await userFactory(testEnv, peterLustig)
|
||||||
await mutate({
|
await mutate({
|
||||||
mutation: login,
|
mutation: login,
|
||||||
variables: { email: 'peter@lustig.de', password: 'Aa12345_' },
|
variables: { email: 'peter@lustig.de', password: 'Aa12345_' },
|
||||||
|
|||||||
@ -46,7 +46,6 @@ jest.mock('@/mailer/sendContributionConfirmedEmail', () => {
|
|||||||
let mutate: any, query: any, con: any
|
let mutate: any, query: any, con: any
|
||||||
let testEnv: any
|
let testEnv: any
|
||||||
let creation: Contribution | void
|
let creation: Contribution | void
|
||||||
let user: User
|
|
||||||
let admin: User
|
let admin: User
|
||||||
let result: any
|
let result: any
|
||||||
|
|
||||||
@ -1009,7 +1008,7 @@ describe('ContributionResolver', () => {
|
|||||||
describe('authenticated', () => {
|
describe('authenticated', () => {
|
||||||
describe('without admin rights', () => {
|
describe('without admin rights', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
user = await userFactory(testEnv, bibiBloxberg)
|
await userFactory(testEnv, bibiBloxberg)
|
||||||
await mutate({
|
await mutate({
|
||||||
mutation: login,
|
mutation: login,
|
||||||
variables: { email: 'bibi@bloxberg.de', password: 'Aa12345_' },
|
variables: { email: 'bibi@bloxberg.de', password: 'Aa12345_' },
|
||||||
@ -1168,7 +1167,7 @@ describe('ContributionResolver', () => {
|
|||||||
|
|
||||||
describe('user to create for is deleted', () => {
|
describe('user to create for is deleted', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
user = await userFactory(testEnv, stephenHawking)
|
await userFactory(testEnv, stephenHawking)
|
||||||
variables.email = 'stephen@hawking.uk'
|
variables.email = 'stephen@hawking.uk'
|
||||||
variables.creationDate = contributionDateFormatter(
|
variables.creationDate = contributionDateFormatter(
|
||||||
new Date(now.getFullYear(), now.getMonth() - 1, 1),
|
new Date(now.getFullYear(), now.getMonth() - 1, 1),
|
||||||
@ -1197,7 +1196,7 @@ describe('ContributionResolver', () => {
|
|||||||
|
|
||||||
describe('user to create for has email not confirmed', () => {
|
describe('user to create for has email not confirmed', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
user = await userFactory(testEnv, garrickOllivander)
|
await userFactory(testEnv, garrickOllivander)
|
||||||
variables.email = 'garrick@ollivander.com'
|
variables.email = 'garrick@ollivander.com'
|
||||||
variables.creationDate = contributionDateFormatter(
|
variables.creationDate = contributionDateFormatter(
|
||||||
new Date(now.getFullYear(), now.getMonth() - 1, 1),
|
new Date(now.getFullYear(), now.getMonth() - 1, 1),
|
||||||
@ -1226,7 +1225,7 @@ describe('ContributionResolver', () => {
|
|||||||
|
|
||||||
describe('valid user to create for', () => {
|
describe('valid user to create for', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
user = await userFactory(testEnv, bibiBloxberg)
|
await userFactory(testEnv, bibiBloxberg)
|
||||||
variables.email = 'bibi@bloxberg.de'
|
variables.email = 'bibi@bloxberg.de'
|
||||||
variables.creationDate = 'invalid-date'
|
variables.creationDate = 'invalid-date'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -28,7 +28,6 @@ let mutate: any, query: any, con: any
|
|||||||
let testEnv: any
|
let testEnv: any
|
||||||
|
|
||||||
let user: User
|
let user: User
|
||||||
let admin: User
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
testEnv = await testEnvironment()
|
testEnv = await testEnvironment()
|
||||||
@ -296,7 +295,7 @@ describe('TransactionLinkResolver', () => {
|
|||||||
describe('with admin rights', () => {
|
describe('with admin rights', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
// admin 'peter@lustig.de' has to exists for 'creationFactory'
|
// admin 'peter@lustig.de' has to exists for 'creationFactory'
|
||||||
admin = await userFactory(testEnv, peterLustig)
|
await userFactory(testEnv, peterLustig)
|
||||||
|
|
||||||
user = await userFactory(testEnv, bibiBloxberg)
|
user = await userFactory(testEnv, bibiBloxberg)
|
||||||
variables.userId = user.id
|
variables.userId = user.id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user