{{ visible ? 'Close' : 'Open' }} {{title}}
@@ -297,6 +303,10 @@ describe('TodosService', () => {
it('should', () => {
let otherService = spectator.get
(OtherService);
otherService.someMethod.andReturn(customValue);
+ otherService.someMethod.and.callThrough();
+ otherService.someMethod.and.callFake(() => fake);
+ otherService.someMethod.and.throwError('Error');
+ otherService.someMethod.andCallFake(() => fake);
spectator.service.remove();
expect(spectator.service.someProp).toBeTruthy();
});
diff --git a/src/app/todos.service.spec.ts b/src/app/todos.service.spec.ts
index 2b1b0698..c5716b12 100644
--- a/src/app/todos.service.spec.ts
+++ b/src/app/todos.service.spec.ts
@@ -1,6 +1,5 @@
import { TodosService } from "./todos.service";
import { createService } from "../lib/src/service";
-import { of } from "rxjs/observable/of";
class OtherService {
add() {}
@@ -15,7 +14,10 @@ describe("TodosService", () => {
it("should", () => {
// let otherService = spectator.get(OtherService);
- // otherService.add.andReturn(of(true));
+ // otherService.add.and.callThrough();
+ // otherService.add.and.callFake(() => fake);
+ // otherService.add.and.throwError('Error');
+ // otherService.add.andCallFake(() => fake);
spectator.service.remove();
});
});
diff --git a/src/lib/src/config.ts b/src/lib/src/config.ts
index 8396b3d6..34b3b3fb 100644
--- a/src/lib/src/config.ts
+++ b/src/lib/src/config.ts
@@ -19,7 +19,7 @@ export type SpectatorOptions = TestModuleMetadata &
component?: Type;
shallow?: boolean;
disableAnimations?: boolean;
- host: Type;
+ host?: Type;
};
const defaultOptions: SpectatorOptions = {