Welcome to mirror list, hosted at ThFree Co, Russian Federation.

getters_spec.js « store « static_site_editor « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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);
    });
  });
});