Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyService {
- protected otherService: OtherService;
- constructor(os: OtherService) {
- this.otherService = ds;
- }
- public someMethod() {
- this.otherService.doSomething();
- }
- }
- describe('Launcher Renderer', () => {
- //dependencies (mocked)
- const os = sinon.mock(new OtherService());
- // the renderer class
- let underTest: MyService;
- before(() => {
- underTest = new MyService(os);
- });
- // actual tests,....
- });
- class MyService {
- protected otherService: OtherService | any;
- constructor(os: OtherService | any) {
- this.otherService = ds;
- }
- public someMethod() {
- this.otherService.doSomething();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement