chore(board): remove old board tests, update seed + onboarding tests
This commit is contained in:
parent
7707068f36
commit
f3df1945bd
7 changed files with 55 additions and 638 deletions
|
|
@ -1,5 +1,13 @@
|
|||
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
||||
|
||||
const { mockBoardPostExists } = vi.hoisted(() => ({
|
||||
mockBoardPostExists: vi.fn()
|
||||
}))
|
||||
|
||||
vi.mock('../../../server/models/boardPost.js', () => ({
|
||||
default: { exists: mockBoardPostExists }
|
||||
}))
|
||||
|
||||
vi.mock('../../../server/utils/auth.js', () => ({
|
||||
requireAuth: vi.fn()
|
||||
}))
|
||||
|
|
@ -45,6 +53,7 @@ describe('POST /api/onboarding/track', () => {
|
|||
})
|
||||
Member.findByIdAndUpdate.mockResolvedValue({})
|
||||
Member.findOneAndUpdate.mockResolvedValue(null) // no graduation by default
|
||||
mockBoardPostExists.mockResolvedValue({ _id: 'post-1' })
|
||||
})
|
||||
|
||||
// 2.1: Sets eventPageVisited to true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue