summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-05-28 13:41:30 +0200
committerLukas Eipert <leipert@gitlab.com>2018-05-29 18:42:51 +0200
commit6e1a7902f43785bf82084f9eb9cc963d81e3b83e (patch)
tree4a7955c76d471a3102ade87e5359d60669a23440 /spec
parent5777057325d413f4616f0459c5d63581634f4e42 (diff)
downloadgitlab-ce-6e1a7902f43785bf82084f9eb9cc963d81e3b83e.tar.gz
fix last lints
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/blob/notebook/index_spec.js9
-rw-r--r--spec/javascripts/commit/commit_pipeline_status_component_spec.js5
-rw-r--r--spec/javascripts/sidebar/confidential_issue_sidebar_spec.js5
3 files changed, 9 insertions, 10 deletions
diff --git a/spec/javascripts/blob/notebook/index_spec.js b/spec/javascripts/blob/notebook/index_spec.js
index a143fc827d5..80c09a544d6 100644
--- a/spec/javascripts/blob/notebook/index_spec.js
+++ b/spec/javascripts/blob/notebook/index_spec.js
@@ -84,9 +84,14 @@ describe('iPython notebook renderer', () => {
describe('error in JSON response', () => {
let mock;
- beforeEach((done) => {
+ beforeEach(done => {
mock = new MockAdapter(axios);
- mock.onGet('/test').reply(() => Promise.reject({ status: 200, data: '{ "cells": [{"cell_type": "markdown"} }' }));
+ mock
+ .onGet('/test')
+ .reply(() =>
+ // eslint-disable-next-line prefer-promise-reject-errors
+ Promise.reject({ status: 200, data: '{ "cells": [{"cell_type": "markdown"} }' }),
+ );
renderNotebook();
diff --git a/spec/javascripts/commit/commit_pipeline_status_component_spec.js b/spec/javascripts/commit/commit_pipeline_status_component_spec.js
index 421fe62a1e7..d3776d0c3cf 100644
--- a/spec/javascripts/commit/commit_pipeline_status_component_spec.js
+++ b/spec/javascripts/commit/commit_pipeline_status_component_spec.js
@@ -75,10 +75,7 @@ describe('Commit pipeline status component', () => {
describe('When polling data was not succesful', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
- mock.onGet('/dummy/endpoint').reply(() => {
- const res = Promise.reject([502, { }]);
- return res;
- });
+ mock.onGet('/dummy/endpoint').reply(502, {});
vm = new Component({
props: {
endpoint: '/dummy/endpoint',
diff --git a/spec/javascripts/sidebar/confidential_issue_sidebar_spec.js b/spec/javascripts/sidebar/confidential_issue_sidebar_spec.js
index 0c173062835..6110d5d89ac 100644
--- a/spec/javascripts/sidebar/confidential_issue_sidebar_spec.js
+++ b/spec/javascripts/sidebar/confidential_issue_sidebar_spec.js
@@ -8,10 +8,7 @@ describe('Confidential Issue Sidebar Block', () => {
beforeEach(() => {
const Component = Vue.extend(confidentialIssueSidebar);
const service = {
- update: () => new Promise((resolve, reject) => {
- resolve(true);
- reject('failed!');
- }),
+ update: () => Promise.resolve(true),
};
vm1 = new Component({