Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cdk/testing/tests/testbed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ describe('TestbedHarnessEnvironment', () => {
harness.getTaskStateResult().then(res => expect(res).toBe('result'));
}));

// Testing the integration with fakeAsync.
// tslint:disable-next-line:ban
it('should be able to wait for tasks outside of Angular within fakeAsync test zone', fakeAsync(async () => {
expect(await harness.getTaskStateResult()).toBe('result');
}));
Expand All @@ -96,6 +98,8 @@ describe('TestbedHarnessEnvironment', () => {
expect(element.id).toContain('root');
});

// Testing the integration with fakeAsync.
// tslint:disable-next-line:ban
it('should wait for async operation to complete in fakeAsync test', fakeAsync(async () => {
const asyncCounter = await harness.asyncCounter();
expect(await asyncCounter.text()).toBe('5');
Expand Down
1 change: 1 addition & 0 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
["fdescribe"],
["xit"],
["xdescribe"],
{"name": ["fakeAsync"], "message": "`fakeAsync` tests are no longer allowed."},
{"name": ["first"], "message": "Use take(1) instead."},
{"name": ["Object", "assign"], "message": "Use the spread operator instead."},
{"name": ["*", "asObservable"], "message": "Cast to Observable type instead."},
Expand Down
Loading