How to use the jest/vue_shared/components/issue/related_issuable_mock_data.issuable1.id function in jest

To help you get started, we’ve selected a few jest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gitlabhq / gitlabhq / spec / frontend / issuable / related_issues / components / related_issues_root_spec.js View on Github external
it('remove related issue and succeeds', () => {
        mock.onDelete(issuable1.referencePath).reply(200, { issues: [] });

        wrapper.vm.onRelatedIssueRemoveRequest(issuable1.id);

        return axios.waitForAll().then(() => {
          expect(wrapper.vm.state.relatedIssues).toEqual([]);
        });
      });
github gitlabhq / gitlabhq / spec / frontend / issuable / related_issues / components / related_issues_list_spec.js View on Github external
it('issuableType is issue', () => {
      wrapper = shallowMount(RelatedIssuesList, {
        propsData: {
          pathIdSeparator: PathIdSeparator.Issue,
          issuableType: 'epic',
        },
      });

      expect(wrapper.vm.issuableOrderingId(issuable1)).toBe(issuable1.id);
    });
  });
github gitlabhq / gitlabhq / spec / frontend / issuable / related_issues / components / related_issues_root_spec.js View on Github external
return waitForPromises().then(() => {
          expect(wrapper.vm.state.pendingReferences).toHaveLength(0);
          expect(wrapper.vm.state.relatedIssues).toHaveLength(1);
          expect(wrapper.vm.state.relatedIssues[0].id).toEqual(issuable1.id);
        });
      });