Skip to content

Commit

Permalink
[core/public/chrome] test that observables stop immedaiately after st…
Browse files Browse the repository at this point in the history
…op()
  • Loading branch information
spalger committed Sep 20, 2018
1 parent 15677b8 commit 456e11e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/core/public/chrome/chrome_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,19 @@ describe('stop', () => {
service.stop();
await promise;
});

it('completes immediately if service already stopped', async () => {
const service = new ChromeService();
const start = service.start();
service.stop();

await expect(
Rx.combineLatest(
start.getBrand$(),
start.getApplicationClasses$(),
start.getIsCollapsed$(),
start.getIsVisible$()
).toPromise()
).resolves.toBe(undefined);
});
});

0 comments on commit 456e11e

Please sign in to comment.