mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
chore(ci): add local HTTP server for Karma tests; (#7022)
This commit is contained in:
@@ -6,6 +6,8 @@ window.axios = _axios;
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
|
||||
jasmine.getEnv().defaultTimeoutInterval = 60000;
|
||||
|
||||
window.TEST_SERVER_URL = "http://localhost:3000";
|
||||
|
||||
// Get Ajax request using an increasing timeout to retry
|
||||
window.getAjaxRequest = (function () {
|
||||
let attempts = 0;
|
||||
|
||||
@@ -3,7 +3,7 @@ import {retryNetwork} from "../helpers/retry.js";
|
||||
describe('FormData', function() {
|
||||
it('should allow FormData posting', async () => {
|
||||
await retryNetwork(() => {
|
||||
return axios.postForm('http://httpbin.org/post', {
|
||||
return axios.postForm(TEST_SERVER_URL, {
|
||||
a: 'foo',
|
||||
b: 'bar'
|
||||
}).then(({data}) => {
|
||||
|
||||
Reference in New Issue
Block a user