mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
87163dfcd6
Close #10342
16 lines
281 B
JavaScript
16 lines
281 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);
|