Commit b5510ac8 authored by Simon Knox's avatar Simon Knox

make test exports consistent

parent e3405212
/* global BoardService */
/* global mockBoardService */
import Vue from 'vue';
import '~/boards/stores/boards_store';
import boardBlankState from '~/boards/components/board_blank_state';
import { mockBoardService } from './mock_data';
import './mock_data';
describe('Boards blank state', () => {
let vm;
......
......@@ -4,6 +4,7 @@
/* global listObj */
/* global boardsMockInterceptor */
/* global BoardService */
/* global mockBoardService */
import Vue from 'vue';
import '~/boards/models/assignee';
......@@ -12,7 +13,7 @@ import '~/boards/models/list';
import '~/boards/models/label';
import '~/boards/stores/boards_store';
import boardCard from '~/boards/components/board_card';
import { mockBoardService } from './mock_data';
import './mock_data';
describe('Board card', () => {
let vm;
......
......@@ -3,6 +3,7 @@
/* global List */
/* global listObj */
/* global ListIssue */
/* global mockBoardService */
import Vue from 'vue';
import _ from 'underscore';
import Sortable from 'vendor/Sortable';
......@@ -12,7 +13,7 @@ import '~/boards/mixins/sortable_default_options';
import '~/boards/models/issue';
import '~/boards/models/list';
import '~/boards/stores/boards_store';
import { mockBoardService } from './mock_data';
import './mock_data';
window.Sortable = Sortable;
......
/* global boardsMockInterceptor */
/* global BoardService */
/* global mockBoardService */
/* global List */
/* global listObj */
......@@ -7,7 +8,7 @@ import Vue from 'vue';
import boardNewIssue from '~/boards/components/board_new_issue';
import '~/boards/models/list';
import { mockBoardService } from './mock_data';
import './mock_data';
describe('Issue boards new issue form', () => {
let vm;
......
......@@ -4,10 +4,10 @@
/* global listObj */
/* global listObjDuplicate */
/* global ListIssue */
/* global mockBoardService */
import Vue from 'vue';
import Cookies from 'js-cookie';
import '~/lib/utils/url_utility';
import '~/boards/models/issue';
import '~/boards/models/label';
......@@ -15,7 +15,7 @@ import '~/boards/models/list';
import '~/boards/models/assignee';
import '~/boards/services/board_service';
import '~/boards/stores/boards_store';
import { mockBoardService } from './mock_data';
import './mock_data';
describe('Store', () => {
beforeEach(() => {
......
/* global mockBoardService */
import Vue from 'vue';
import '~/boards/services/board_service';
import '~/boards/components/board';
import '~/boards/models/list';
import { mockBoardService } from '../mock_data';
import '../mock_data';
describe('Board component', () => {
let vm;
......
/* eslint-disable comma-dangle */
/* global BoardService */
/* global ListIssue */
/* global mockBoardService */
import Vue from 'vue';
import '~/lib/utils/url_utility';
......@@ -10,7 +11,7 @@ import '~/boards/models/list';
import '~/boards/models/assignee';
import '~/boards/services/board_service';
import '~/boards/stores/boards_store';
import { mockBoardService } from './mock_data';
import './mock_data';
describe('Issue model', () => {
let issue;
......
/* eslint-disable comma-dangle */
/* global boardsMockInterceptor */
/* global BoardService */
/* global mockBoardService */
/* global List */
/* global ListIssue */
/* global listObj */
......@@ -15,7 +16,7 @@ import '~/boards/models/list';
import '~/boards/models/assignee';
import '~/boards/services/board_service';
import '~/boards/stores/boards_store';
import { mockBoardService } from './mock_data';
import './mock_data';
describe('List model', () => {
let list;
......
/* global boardsMockInterceptor */
/* global boardObj */
/* global BoardService */
/* global mockBoardService */
import Vue from 'vue';
import milestoneSelect from '~/boards/components/milestone_select';
import '~/boards/services/board_service';
import '~/boards/stores/boards_store';
import { mockBoardService } from './mock_data';
import './mock_data';
describe('Milestone select component', () => {
let selectMilestoneSpy;
......
......@@ -68,14 +68,7 @@ const boardsMockInterceptor = (request, next) => {
}));
};
window.boardObj = boardObj;
window.listObj = listObj;
window.listObjDuplicate = listObjDuplicate;
window.BoardsMockData = BoardsMockData;
window.boardsMockInterceptor = boardsMockInterceptor;
// eslint-disable-next-line import/prefer-default-export
export function mockBoardService(opts = {}) {
const mockBoardService = (opts = {}) => {
const boardsEndpoint = opts.boardsEndpoint || '/test/issue-boards/board';
const listsEndpoint = opts.listsEndpoint || '/test/boards/1';
const bulkUpdatePath = opts.bulkUpdatePath || '';
......@@ -87,4 +80,11 @@ export function mockBoardService(opts = {}) {
bulkUpdatePath,
boardId,
});
}
};
window.boardObj = boardObj;
window.listObj = listObj;
window.listObjDuplicate = listObjDuplicate;
window.BoardsMockData = BoardsMockData;
window.boardsMockInterceptor = boardsMockInterceptor;
window.mockBoardService = mockBoardService;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment