Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe("fakeSchedulers", () => {
it(
"should support a timer",
fakeSchedulers(() => {
let received: number | undefined;
timer(100).subscribe(value => (received = value));
tick(50);
expect(received).not.toBeDefined();
tick(50);
expect(received).toBe(0);
})
);
it(
"should support delay",
fakeSchedulers(() => {
let received: number | undefined;
of(1)
.pipe(delay(100))
.subscribe(value => (received = value));