add another test for UtilRegistry

This commit is contained in:
Felix Hamann 2019-05-26 20:57:45 +02:00
parent cb2895e1f8
commit bb411a1a28

View File

@ -21,6 +21,12 @@ describe('UtilRegistry', () => {
expect(utilRegistry).toBeTruthy();
});
it('should setup all utlites when page is done loading', () => {
spyOn(utilRegistry, 'setupAll');
document.dispatchEvent(new Event('DOMContentLoaded'));
expect(utilRegistry.setupAll).toHaveBeenCalled();
});
describe('register()', () => {
it('should allow to add utilities', () => {
utilRegistry.register(TEST_UTILS[0]);