本文整理匯總了TypeScript中knexClient.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了default函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should delete a dio', async () => {
const response = await request(app)
.delete('/api/dios/1')
.set('Accept', 'application/json')
.set('x-access-token', user.token);
expect(response.status).toHaveStatusOk();
const dio = await knex(Dio.TABLE)
.select()
.where('roomId', 1);
expect(dio).toHaveLength(0);
});
示例2: Date
it('should update all computeNextRunAt', async () => {
const clock = lolex.install({ now: new Date('2019-01-01T00:00') });
await routineService.load();
clock.uninstall();
const routines = await knex(Routine.TABLE).orderBy('routineId');
expect(routines[0].nextRunAt).toEqual(
new Date('2019-01-01T05:00').getTime(),
);
expect(routines[1].nextRunAt).toEqual(
new Date('2019-01-02T09:00').getTime(),
);
});
示例3: knex
afterEach(async () => {
await knex(Routine.TABLE).truncate();
routineService.processes.forEach(process => clearTimeout(process));
routineService.processes.clear();
});
示例4: knex
afterAll(async () => {
await knex(User.TABLE).truncate();
});