diff options
| author | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-09 20:03:09 +0200 |
|---|---|---|
| committer | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-17 06:57:29 +0200 |
| commit | 6f5723a169b5d400c136dbd844fc54c68e5f8563 (patch) | |
| tree | e7bad2648366ed5943293655a0abe23367e869a6 /spec/javascripts/boards | |
| parent | 28d412e5b2b8499fba22e8fabb1d44f44449228e (diff) | |
| download | gitlab-ce-6f5723a169b5d400c136dbd844fc54c68e5f8563.tar.gz | |
enable jasmine/new-line-before-expect
Diffstat (limited to 'spec/javascripts/boards')
| -rw-r--r-- | spec/javascripts/boards/boards_store_spec.js | 4 | ||||
| -rw-r--r-- | spec/javascripts/boards/issue_spec.js | 9 | ||||
| -rw-r--r-- | spec/javascripts/boards/list_spec.js | 4 |
3 files changed, 17 insertions, 0 deletions
diff --git a/spec/javascripts/boards/boards_store_spec.js b/spec/javascripts/boards/boards_store_spec.js index dfd3ea0db66..3b10550ba63 100644 --- a/spec/javascripts/boards/boards_store_spec.js +++ b/spec/javascripts/boards/boards_store_spec.js @@ -86,10 +86,12 @@ describe('Store', () => { description: 'testing;' } }); + expect(boardsStore.state.lists.length).toBe(1); setTimeout(() => { const list = boardsStore.findList('id', listObj.id); + expect(list).toBeDefined(); expect(list.id).toBe(listObj.id); expect(list.position).toBe(0); @@ -103,6 +105,7 @@ describe('Store', () => { it('check for blank state not adding', () => { boardsStore.addList(listObj); + expect(boardsStore.shouldAddBlankState()).toBe(false); }); @@ -118,6 +121,7 @@ describe('Store', () => { boardsStore.addBlankState(); const list = boardsStore.findList('type', 'blank', 'blank'); + expect(list).toBeDefined(); }); diff --git a/spec/javascripts/boards/issue_spec.js b/spec/javascripts/boards/issue_spec.js index e8387068831..b3d215b7b25 100644 --- a/spec/javascripts/boards/issue_spec.js +++ b/spec/javascripts/boards/issue_spec.js @@ -47,6 +47,7 @@ describe('Issue model', () => { color: 'blue', description: 'bugs!' }); + expect(issue.labels.length).toBe(2); }); @@ -63,12 +64,14 @@ describe('Issue model', () => { it('finds label', () => { const label = issue.findLabel(issue.labels[0]); + expect(label).toBeDefined(); }); it('removes label', () => { const label = issue.findLabel(issue.labels[0]); issue.removeLabel(label); + expect(issue.labels.length).toBe(0); }); @@ -79,9 +82,11 @@ describe('Issue model', () => { color: 'blue', description: 'bugs!' }); + expect(issue.labels.length).toBe(2); issue.removeLabels([issue.labels[0], issue.labels[1]]); + expect(issue.labels.length).toBe(0); }); @@ -98,17 +103,20 @@ describe('Issue model', () => { it('finds assignee', () => { const assignee = issue.findAssignee(issue.assignees[0]); + expect(assignee).toBeDefined(); }); it('removes assignee', () => { const assignee = issue.findAssignee(issue.assignees[0]); issue.removeAssignee(assignee); + expect(issue.assignees.length).toBe(0); }); it('removes all assignees', () => { issue.removeAllAssignees(); + expect(issue.assignees.length).toBe(0); }); @@ -131,6 +139,7 @@ describe('Issue model', () => { it('updates data', () => { issue.updateData({ subscribed: true }); + expect(issue.subscribed).toBe(true); }); diff --git a/spec/javascripts/boards/list_spec.js b/spec/javascripts/boards/list_spec.js index ba6e81a29a9..667fb710062 100644 --- a/spec/javascripts/boards/list_spec.js +++ b/spec/javascripts/boards/list_spec.js @@ -60,6 +60,7 @@ describe('List model', () => { it('destroys the list', (done) => { boardsStore.addList(listObj); list = boardsStore.findList('id', listObj.id); + expect(boardsStore.state.lists.length).toBe(1); list.destroy(); @@ -72,6 +73,7 @@ describe('List model', () => { it('gets issue from list', (done) => { setTimeout(() => { const issue = list.findIssue(1); + expect(issue).toBeDefined(); done(); }, 0); @@ -80,8 +82,10 @@ describe('List model', () => { it('removes issue', (done) => { setTimeout(() => { const issue = list.findIssue(1); + expect(list.issues.length).toBe(1); list.removeIssue(issue); + expect(list.issues.length).toBe(0); done(); }, 0); |
