Skip to content

Commit

Permalink
chore(helpers/jest-db): removed unused helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
seaerchin committed Apr 12, 2021
1 parent 9ffe5a1 commit 94d1a25
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/unit/backend/helpers/jest-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
IUserSchema,
ResponseMode,
} from 'src/types'
import { SettingsUpdateDto } from 'src/types/api'

import MemoryDatabaseServer from 'tests/database'

Expand Down Expand Up @@ -220,16 +219,6 @@ const getFullFormById = async (
): Promise<IPopulatedForm | null> =>
await getEmailFormModel(mongoose).getFullFormById(formId)

// 1. Get full form by id
// 2. Patch in new settings
const updateForm = async (
formId: string,
settingsToUpdate: SettingsUpdateDto,
): Promise<IFormSchema | null> =>
await getEmailFormModel(mongoose)
.findByIdAndUpdate(formId, settingsToUpdate)
.exec()

const dbHandler = {
connect,
closeDatabase,
Expand All @@ -241,7 +230,6 @@ const dbHandler = {
insertEmailForm,
insertEncryptForm,
getFullFormById,
updateForm,
}

export default dbHandler

0 comments on commit 94d1a25

Please sign in to comment.