-
Notifications
You must be signed in to change notification settings - Fork 1
Unit Test Helpers
Charles Alleman edited this page Aug 25, 2021
·
2 revisions
createComponentFactory({
component: MockComponent,
imports: [MockBawApiModule],
});
createComponentFactory({
component: MockComponent,
imports: [MockAppConfigModule],
});
createComponentFactory({
component: MockComponent,
imports: [...testFormImports],
declarations: [FormComponent],
mocks: [ToastrService],
});
-
Have you added
SharedModule
?createComponentFactory({ component: MockComponent, imports: [SharedModule], });
-
If the component uses any directives, but cannot import the
SharedModule
createComponentFactory({ component: MockComponent, imports: [DirectivesModule], });
-
Need to change the size of the browser?
-
Set the size of the window using the following options (sizes relate to bootstrap):
viewport.set("extra-large"); viewport.set("large"); viewport.set("medium"); viewport.set("small"); viewport.set("extra-small");
-