Skip to content

Commit

Permalink
feat(Platform): Resume should be subscribable
Browse files Browse the repository at this point in the history
fix #25
  • Loading branch information
stonelasley committed Jul 7, 2018
1 parent 5c20b0f commit bf67932
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/angular/platform.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ describe('PlatformMock', () => {
it('should be defined', () => {
expect(classUnderTest.resume).toBeDefined();
});

it('should return empty Observable', done => {
classUnderTest.resume().subscribe(result => {
expect(result).toBeUndefined();
done();
});
});
});

describe('setDir', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/angular/platform.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BaseMock } from './../base.mock';
import { deprecated } from 'deprecated-decorator';
import { ArrayObservable } from 'rxjs/observable/ArrayObservable';

const METHODS = [
'dir',
Expand Down Expand Up @@ -63,6 +64,7 @@ export class PlatformMock extends BaseMock {
paddingBottom: '10'
});
this.spyObj.timeout.and.returnValue((callback: any, timer: number) => setTimeout(callback, timer));
this.spyObj.resume.and.returnValue(ArrayObservable.of(undefined));
}

@deprecated('new PlatformMock()')
Expand Down

0 comments on commit bf67932

Please sign in to comment.