本文整理汇总了TypeScript中schedules/controllers/edit.categories函数的典型用法代码示例。如果您正苦于以下问题:TypeScript categories函数的具体用法?TypeScript categories怎么用?TypeScript categories使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了categories函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("should eventually return a filtered & limited list of subcategories", (): void => {
categories = scheduleEditController.categories("a", 3, parentCategory);
categories.should.eventually.deep.equal([
createCategory({id: 1, name: "aa", num_children: 2, children: [
createCategory({id: 10, name: "aa_1", parent_id: 1, parent:
createCategory({id: 1, name: "aa", num_children: 2})
}),
createCategory({id: 11, name: "aa_2", parent_id: 1, parent:
createCategory({id: 1, name: "aa", num_children: 2})
})
]}),
createCategory({id: 4, name: "ba", direction: "outflow", children: []}),
createCategory({id: 5, name: "ab", children: []})
]);
});