Skip to content

Commit

Permalink
fixup! ref(KUI-1256): ref server/ according to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
belanglos committed Mar 15, 2024
1 parent 0098888 commit c77f3af
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions server/controllers/__tests__/courseCtrl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ jest.mock('../../apiCalls/koppsCourseData', () => ({ getKoppsCourseData: () => (
jest.mock('../../apiCalls/ugRestApi', () => ({
getCourseEmployees: jest.fn(() => ({ examiners: '<p>Examiner 1 </p>' })),
}))
// `errorResponse` is clearly used below
// eslint-disable-next-line no-unused-vars
let testResponse, errorResponse
let testResponse

jest.mock('../../utils/serverSideRendering', () => ({
getServerSideFunctions: jest.fn(() => ({
Expand All @@ -78,7 +76,6 @@ const courseCtrl = require('../courseCtrl')
let response
beforeEach(() => {
testResponse = {}
errorResponse = null
response = { render: jest.fn().mockImplementation((name, values) => (testResponse = values)) }
})

Expand All @@ -98,7 +95,7 @@ describe('Discontinued course to test', () => {
},
language: 'sv',
})
const next = jest.fn().mockImplementation(error => (errorResponse = error))
const next = jest.fn()

await courseCtrl.getIndex(req, response, next)

Expand Down

0 comments on commit c77f3af

Please sign in to comment.