В функции fakeAsync используйте tick () для эмуляции времени ожидания.Примерно так:
it('Should execute setNumber', fakeAsync(() => {
let first;
let second;
setTimeout(() => {
first = 12;
second = 1235;
}, 250);
tick(251);
expect(first).toEqual(12);
expect(second).toEqual(1235);
}));
Для понимания отметьте 249, и тест не пройден.
it('Should execute setNumber', fakeAsync(() => {
let first;
let second;
setTimeout(() => {
first = 12;
second = 1235;
}, 250);
tick(249);
expect(first).toEqual(12);
expect(second).toEqual(1235);
}));
Надеюсь, я вам помог:)