Added support to dispatch all UI actions based on mercure bindings on a specific schedule instead of real time

This commit is contained in:
Alejandro Celaya
2020-09-12 08:52:03 +02:00
parent 9b45513684
commit ad437f655e
10 changed files with 31 additions and 18 deletions

View File

@@ -20,7 +20,7 @@ describe('helpers', () => {
[ Mock.of<MercureInfo>({ loading: false, error: false, mercureHubUrl: undefined }) ],
[ Mock.of<MercureInfo>({ loading: true, error: true, mercureHubUrl: undefined }) ],
])('does not bind an EventSource when loading, error or no hub URL', (mercureInfo) => {
bindToMercureTopic(mercureInfo, '', identity, identity)();
bindToMercureTopic(mercureInfo, '', identity, identity);
expect(EventSource).not.toHaveBeenCalled();
expect(onMessage).not.toHaveBeenCalled();
@@ -40,7 +40,7 @@ describe('helpers', () => {
error: false,
mercureHubUrl,
token,
}, topic, onMessage, onTokenExpired)();
}, topic, onMessage, onTokenExpired);
expect(EventSource).toHaveBeenCalledWith(hubUrl, {
headers: {