mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Mock config in time unit unit test
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
import { beforeEach, describe, expect, it, jest } from '@jest/globals'
|
||||
jest.mock('../../utils/config', () => ({ NOW_DB_NAME: 'test_now_db' }))
|
||||
jest.mock('../../utils/db', () => ({
|
||||
nowDb: { now_loc: { count: jest.fn() } },
|
||||
getFieldsOfTables: jest.fn(() => []),
|
||||
logDb: { log: { fields: {} } },
|
||||
pool: {},
|
||||
}))
|
||||
|
||||
import { deleteTimeUnit, ConflictError, TIME_UNIT_IN_USE_MESSAGE } from '../../services/write/timeUnit'
|
||||
import { getTimeUnitDetails } from '../../services/timeUnit'
|
||||
import { nowDb } from '../../utils/db'
|
||||
|
||||
Reference in New Issue
Block a user