debian-mirror-gitlab/spec/frontend/monitoring/store/index_spec.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
641 B
JavaScript
Raw Normal View History

2020-06-23 00:09:42 +05:30
import { createStore } from '~/monitoring/stores';
describe('Monitoring Store Index', () => {
it('creates store with a `monitoringDashboard` namespace', () => {
expect(createStore().state).toEqual({
monitoringDashboard: expect.any(Object),
});
});
it('creates store with initial values', () => {
const defaults = {
deploymentsEndpoint: '/mock/deployments',
dashboardEndpoint: '/mock/dashboard',
dashboardsEndpoint: '/mock/dashboards',
};
const { state } = createStore(defaults);
expect(state).toEqual({
monitoringDashboard: expect.objectContaining(defaults),
});
});
});