2019-02-20 15:26:44 -05:00
|
|
|
import Vue from 'vue';
|
|
|
|
import Translate from '~/vue_shared/translate';
|
2019-02-20 14:59:44 -05:00
|
|
|
import axios from '~/lib/utils/axios_utils';
|
2019-03-08 09:07:44 -05:00
|
|
|
import { initializeTestTimeout } from './helpers/timeout';
|
2019-02-20 14:59:44 -05:00
|
|
|
|
2019-03-08 09:07:44 -05:00
|
|
|
initializeTestTimeout(300);
|
2019-02-20 14:59:44 -05:00
|
|
|
|
|
|
|
// fail tests for unmocked requests
|
|
|
|
beforeEach(done => {
|
|
|
|
axios.defaults.adapter = config => {
|
|
|
|
const error = new Error(`Unexpected unmocked request: ${JSON.stringify(config, null, 2)}`);
|
|
|
|
error.config = config;
|
|
|
|
done.fail(error);
|
|
|
|
return Promise.reject(error);
|
|
|
|
};
|
|
|
|
|
|
|
|
done();
|
|
|
|
});
|
2019-02-20 15:26:44 -05:00
|
|
|
|
|
|
|
Vue.use(Translate);
|