本文整理汇总了TypeScript中mocks/schedules/factories.createScheduledBasicTransaction函数的典型用法代码示例。如果您正苦于以下问题:TypeScript createScheduledBasicTransaction函数的具体用法?TypeScript createScheduledBasicTransaction怎么用?TypeScript createScheduledBasicTransaction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了createScheduledBasicTransaction函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("should dispatch a PATCH request to /schedules/{id} when an id is provided", (): void => {
const schedule: ScheduledBasicTransaction = createScheduledBasicTransaction({id: 1});
$httpBackend.expectPATCH(/schedules\/1$/, schedule);
scheduleModel.save(schedule);
$httpBackend.flush();
});
示例2: createScheduledBasicTransaction
function *schedules(count: number): Iterable<ScheduledBasicTransaction> {
for (let id = 1, daysAgo = count + 1; id < count + 1; id++, daysAgo--) {
yield createScheduledBasicTransaction({
id,
next_due_date: subDays(startOfDay(new Date()), daysAgo)
});
}
}
示例3: beforeEach
beforeEach((): ScheduledTransaction => (schedule = scheduleModel["stringify"](createScheduledBasicTransaction({next_due_date: startOfDay(new Date())}))));