mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-05 13:39:40 +08:00
15 lines
280 B
JavaScript
15 lines
280 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);
|