Kristiyan Kostadinov e86a1d3441 docs: make all examples compatible with strict mode (#41999)
Turns on the `strict` compiler flag and resolves the compilation errors in the various AIO examples.

PR Close #41999
2021-05-17 10:42:18 -07:00

20 lines
695 B
TypeScript

import { docRegionObserver } from './subscribing';
describe('subscribing', () => {
it('should subscribe and emit', () => {
const consoleSpy = jasmine.createSpyObj<Console>('console', ['log']);
docRegionObserver(consoleSpy);
expect(consoleSpy.log).toHaveBeenCalledTimes(8);
expect(consoleSpy.log.calls.allArgs()).toEqual([
['Observer got a next value: 1'],
['Observer got a next value: 2'],
['Observer got a next value: 3'],
['Observer got a complete notification'],
['Observer got a next value: 1'],
['Observer got a next value: 2'],
['Observer got a next value: 3'],
['Observer got a complete notification'],
]);
});
});