This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
fradrive-old/frontend/src/utils/alerts/alerts.spec.js
2019-07-03 11:59:02 +02:00

28 lines
479 B
JavaScript

import { Alerts } from './alerts';
const MOCK_APP = {
httpClient: {
addResponseInterceptor: () => {},
},
};
describe('Alerts', () => {
let alerts;
beforeEach(() => {
const element = document.createElement('div');
alerts = new Alerts(element, MOCK_APP);
});
it('should create', () => {
expect(alerts).toBeTruthy();
});
it('should throw if called without an element', () => {
expect(() => {
new Alerts();
}).toThrow();
});
});