ant-design-vue/components/upload/__tests__/mock.js
2019-12-10 13:16:16 +08:00

14 lines
279 B
JavaScript

import mock from 'xhr-mock';
export function setup() {
mock.setup();
mock.post('http://upload.com/', (req, res) => {
req.headers({
'content-length': 100,
});
req.body('thisisbody');
return res;
});
}
export const teardown = mock.teardown.bind(mock);