You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1021 B
TypeScript
26 lines
1021 B
TypeScript
import { describe, it, expect, beforeEach } from 'vitest'
|
|
import { openDb, type DB } from '../src/db'
|
|
import { seedIfEmpty } from '../src/seed'
|
|
import { milestoneTemplate } from '../src/repos-milestones'
|
|
|
|
describe('seed per-module onboarding templates', () => {
|
|
let db: DB
|
|
beforeEach(async () => { db = openDb(':memory:'); await seedIfEmpty(db) })
|
|
|
|
it('seeds the SMS 9-step list', async () => {
|
|
const keys = (await milestoneTemplate(db, 'SMS')).map((e) => e.key)
|
|
expect(keys).toEqual([
|
|
'document_collection', 'dlt_registration', 'account_creation', 'installation',
|
|
'testing', 'training', 'go_live', 'advance_payment', 'balance_payment',
|
|
])
|
|
})
|
|
|
|
it('seeds the RTGS list ending in payment steps', async () => {
|
|
const keys = (await milestoneTemplate(db, 'RTGS')).map((e) => e.key)
|
|
expect(keys).toEqual([
|
|
'document_collection', 'server_checkup', 'setup_configuration', 'installation',
|
|
'testing', 'training', 'go_live', 'advance_payment', 'balance_payment',
|
|
])
|
|
})
|
|
})
|