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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/jira_import/utils_spec.js')
-rw-r--r--spec/frontend/jira_import/utils_spec.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/frontend/jira_import/utils_spec.js b/spec/frontend/jira_import/utils_spec.js
new file mode 100644
index 00000000000..a14db104229
--- /dev/null
+++ b/spec/frontend/jira_import/utils_spec.js
@@ -0,0 +1,27 @@
+import { IMPORT_STATE, isInProgress } from '~/jira_import/utils';
+
+describe('isInProgress', () => {
+ it('returns true when state is IMPORT_STATE.SCHEDULED', () => {
+ expect(isInProgress(IMPORT_STATE.SCHEDULED)).toBe(true);
+ });
+
+ it('returns true when state is IMPORT_STATE.STARTED', () => {
+ expect(isInProgress(IMPORT_STATE.STARTED)).toBe(true);
+ });
+
+ it('returns false when state is IMPORT_STATE.FAILED', () => {
+ expect(isInProgress(IMPORT_STATE.FAILED)).toBe(false);
+ });
+
+ it('returns false when state is IMPORT_STATE.FINISHED', () => {
+ expect(isInProgress(IMPORT_STATE.FINISHED)).toBe(false);
+ });
+
+ it('returns false when state is IMPORT_STATE.NONE', () => {
+ expect(isInProgress(IMPORT_STATE.NONE)).toBe(false);
+ });
+
+ it('returns false when state is undefined', () => {
+ expect(isInProgress()).toBe(false);
+ });
+});