Wednesday, September 18, 2019

Take out the fakeAsync from a Jasmine/Karma test when applicable.

it('title setting behaves as expected', fakeAsync(()=> {
   let notice:Notice = new Notice("Success!");
   notice.message = "The grumpy cat has died.";
   expect(notice.title).toBe("Success!");
   expect(notice.message).toBe("The grumpy cat has died.");
}));

 
 

...could just become...

it('title setting behaves as expected', ()=> {
   let notice:Notice = new Notice("Success!");
   notice.message = "The grumpy cat has died.";
   expect(notice.title).toBe("Success!");
   expect(notice.message).toBe("The grumpy cat has died.");
});

No comments:

Post a Comment