本文整理汇总了TypeScript中app/testutils.getComponent函数的典型用法代码示例。如果您正苦于以下问题:TypeScript getComponent函数的具体用法?TypeScript getComponent怎么用?TypeScript getComponent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getComponent函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(async () => {
mockApp();
$state = await getComponent("$state");
$stateParams = await getComponent("$stateParams");
$rootScope = await getComponent("$rootScope");
$timeout = await getComponent("$timeout");
});
示例2: test
test("All states use require as template", async () => {
const $state: any = await getComponent("$state");
_.each($state.get(), state => {
if (state.templateUrl) {
console.error("You should use 'template: require(...)' with state:", state.name);
}
expect(state.templateUrl).toBeFalsy();
expect(!state.template && !state.abstract && _.isEmpty(state.views)).toBeFalsy();
if (!_.isEmpty(state.views)) {
_.each(state.views, view => {
expect(_.isString(view.template)).toBeTruthy();
});
}
});
});
示例3: beforeEach
beforeEach(async () => {
mockApp();
Api = await getComponent("Api");
});
示例4: beforeEach
beforeEach(async () => {
mockApp();
PerusteenRakenne = await getComponent("PerusteenRakenne");
});
示例5: beforeEach
beforeEach(async () => {
mockApp();
virheService = await getComponent("virheService");
});
示例6: beforeEach
beforeEach(async () => {
Algoritmit = await getComponent("Algoritmit");
});
示例7: beforeEach
beforeEach(async () => {
mockApp();
YleinenData = await getComponent("YleinenData");
});