Upload: fix type error in unit test (#15979)

pull/15504/head
hetech 2019-06-10 14:20:11 +08:00 committed by GitHub
parent b8f2007afa
commit f843a0bffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -1,13 +1,13 @@
import { createVue, destroyVM } from '../util.js';
import ajax from 'packages/upload/src/ajax';
const noop = () => {
};
const noop = () => {};
const option = {
onSuccess: noop,
onProgress: noop,
data: { a: 'abc', b: 'bcd' },
filename: 'file.png',
file: 'foo',
file: new File([JSON.stringify('foo')], {type: 'image/png'}),
action: '/upload',
headers: { region: 'shanghai' }
};
@ -35,7 +35,6 @@ describe('ajax', () => {
it('request width header', done => {
ajax(option);
expect(requests[0].requestHeaders).to.eql({
// 'X-Requested-With': 'XMLHttpRequest',
region: 'shanghai'
});
done();