Skip to content

Commit

Permalink
fix: clean up constants and unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
wanlingt committed Nov 15, 2023
1 parent 376808d commit 29a0aee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions __tests__/integration/helpers/express-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as OtpUtils from 'src/app/utils/otp'

const MOCK_VALID_OTP = '123456'
const MOCK_OTP_PREFIX = 'ABC'
const ADMIN_LOGIN_SESSION_COOKIE_NAME = 'formsg.connect.sid'

/**
* Integration test helper to create an authenticated session where the user
Expand Down Expand Up @@ -50,7 +51,7 @@ export const createAuthedSession = async (
// Assert
// Should have session cookie returned.
const sessionCookie = request.cookies.find(
(cookie) => cookie.name === 'formsg.connect.sid',
(cookie) => cookie.name === ADMIN_LOGIN_SESSION_COOKIE_NAME,
)
expect(sessionCookie).toBeDefined()

Expand All @@ -68,7 +69,7 @@ export const logoutSession = async (request: Session): Promise<Session> => {
expect(response.status).toEqual(200)

const sessionCookie = request.cookies.find(
(cookie) => cookie.name === 'formsg.connect.sid',
(cookie) => cookie.name === ADMIN_LOGIN_SESSION_COOKIE_NAME,
)
expect(sessionCookie).not.toBeDefined()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormAuthType, FormResponseMode } from '~shared/types/form'
import { FormAuthType } from '~shared/types/form'

export type EmailFormAuthType = FormAuthType
export type StorageFormAuthType = FormAuthType
Expand Down

0 comments on commit 29a0aee

Please sign in to comment.