Compare commits

..

No commits in common. "florent-patch-1" and "master" have entirely different histories.

View File

@ -416,32 +416,26 @@ describe("test class RSS: jsonfile", function () {
// when
myListener.start();
await clock.tickAsync(1);
// then
await clock.tickAsync(1);
expect(updateListenerSpy).to.have.been.calledOnce;
expect(newEntriesListenerSpy).to.have.been.calledOnce;
expect(newEntriesListenerSpy).to.not.have.been.called;
// given
stubParser.resolves(newRSSOutput);
// when
await clock.tickAsync(60000);
// then
await clock.tickAsync(60000);
expect(updateListenerSpy).to.have.been.calledTwice;
expect(newEntriesListenerSpy).to.have.been.calledTwice;
expect(newEntriesListenerSpy).to.have.been.calledOnce;
expect(newEntriesListenerSpy).to.have.been.calledWith([newEntry]);
// given
newEntriesListenerSpy.resetHistory();
// when
await clock.tickAsync(60000);
// then
await clock.tickAsync(60000);
expect(updateListenerSpy).to.have.been.calledThrice;
expect(updateListenerSpy).to.have.been.calledWith(mockedRSSOutput);
expect(newEntriesListenerSpy).to.not.have.been.called;
@ -488,20 +482,17 @@ describe("test class RSS: jsonfile", function () {
// when
myListener.start();
await clock.tickAsync(1);
// then
await clock.tickAsync(1);
expect(updateListenerSpy).to.have.been.calledOnce;
expect(newEntriesListenerSpy).to.not.have.been.calledOnce;
// given
stubParser.resolves(newRSSOutput);
// when
await clock.tickAsync(60000);
// then
await clock.tickAsync(60000);
expect(updateListenerSpy).to.have.been.calledTwice;
expect(newEntriesListenerSpy).to.have.been.calledOnce;
expect(newEntriesListenerSpy).to.have.been.calledWith([newEntry]);
@ -509,10 +500,8 @@ describe("test class RSS: jsonfile", function () {
// given
newEntriesListenerSpy.resetHistory();
// when
await clock.tickAsync(60000);
// then
await clock.tickAsync(60000);
expect(updateListenerSpy).to.have.been.calledThrice;
expect(updateListenerSpy).to.have.been.calledWith(mockedRSSOutput);
expect(newEntriesListenerSpy).to.not.have.been.called;