|
|
|
@ -9,6 +9,11 @@ import axios from 'axios';
@@ -9,6 +9,11 @@ import axios from 'axios';
|
|
|
|
|
import common from '../common.mjs'; |
|
|
|
|
import HeroUnion from '../heroUnion.mjs'; |
|
|
|
|
|
|
|
|
|
const axiosConfig = { |
|
|
|
|
timeout: 5000, |
|
|
|
|
proxy: false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
test('Hero onboard test', async (t) => { |
|
|
|
|
let params = { |
|
|
|
|
name: 'test_hero', |
|
|
|
@ -21,7 +26,7 @@ test('Hero onboard test', async (t) => {
@@ -21,7 +26,7 @@ test('Hero onboard test', async (t) => {
|
|
|
|
|
|
|
|
|
|
let api = 'http://127.0.0.1:8080/api/onboard/'; |
|
|
|
|
|
|
|
|
|
const response = await axios.post(api, params, {timeout: 5000}); |
|
|
|
|
const response = await axios.post(api, params, axiosConfig); |
|
|
|
|
console.log(response.data); |
|
|
|
|
|
|
|
|
|
assert.equal(response.status, 200); |
|
|
|
@ -31,8 +36,8 @@ test('Hero onboard test', async (t) => {
@@ -31,8 +36,8 @@ test('Hero onboard test', async (t) => {
|
|
|
|
|
test('HeroUnion stats test', async (t) => { |
|
|
|
|
let api = 'http://127.0.0.1:8080/api/stats/'; |
|
|
|
|
|
|
|
|
|
const response = await axios.get(api, {timeout: 5000}); |
|
|
|
|
const response = await axios.get(api, axiosConfig); |
|
|
|
|
console.log(response.data); |
|
|
|
|
|
|
|
|
|
assert.equal(response.status, 200); |
|
|
|
|
}); |
|
|
|
|
}); |