ant-design/components/upload/__tests__/mock.ts
lijianan c34caad24c
test: js => ts ()
* test: js => ts

* test: add test

* fix: fix eslint error

* test: add test case

* fix: fix test error

* fix: fix eslint error

* fix: fix eslint error

* fix: eslint error fix

* fix: fallback eslint config & add test case

* test: add all test case

* fix: bugfix

* fix: bugFix

* fix: bugFix

* fix: bugFix

* fix: lint

* fix: add React.createRef

* fix: add breadcrumbName in Routes

* fix: any commit for restart ci/cd

* fix: remove type

* fix: test fix

* fix: test fix

* fix: add ts-ignore for id

* test: add Icon test case

* test: remove ts-ignore

* test: add Icon test case
2022-09-05 19:41:32 +08:00

13 lines
290 B
TypeScript

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