summaryrefslogtreecommitdiff
path: root/spec/frontend/static_site_editor/store/getters_spec.js
blob: 8800216f3b05c44263fd4000b20657f86cec0db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import createState from '~/static_site_editor/store/state';
import { isContentLoaded } from '~/static_site_editor/store/getters';
import { sourceContent as content } from '../mock_data';

describe('Static Site Editor Store getters', () => {
  describe('isContentLoaded', () => {
    it('returns true when content is not empty', () => {
      expect(isContentLoaded(createState({ content }))).toBe(true);
    });

    it('returns false when content is empty', () => {
      expect(isContentLoaded(createState({ content: '' }))).toBe(false);
    });
  });
});