synapse-admin/tests/setup.js
Manuel Stahl 00d6959927 Create synapse-admin using 'rekit create --sass synapse-admin'
Change-Id: I14a94754264c83faffb7fea5099d37c97e60b07a
2019-03-11 17:06:04 +01:00

14 lines
513 B
JavaScript

// This module will be executed before all other tests are executed,
// so import all necessary modules which should be included for webpack compiling.
import axios from 'axios';
import httpAdapter from 'axios/lib/adapters/http';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter(), disableLifecycleMethods: true });
if (process.env.NODE_ENV === 'test') {
axios.defaults.baseURL = 'http://localhost';
axios.defaults.adapter = httpAdapter;
}