- Update karma version;

This commit is contained in:
dkhang97
2019-08-15 15:49:06 -07:00
parent 8878aa2f88
commit 7b9401e8f0
3 changed files with 322 additions and 430 deletions

738
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -84,8 +84,8 @@
"jasmine-core": "2.5.2",
"jasmine-data-provider": "2.2.0",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.4.0",
"karma-chrome-launcher": "^2.0.0",
"karma": "^4.2.0",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "^1.0.2",

View File

@@ -375,11 +375,11 @@ export class FileUploader {
if (this.authToken) {
xhr.setRequestHeader(this.authTokenHeader, this.authToken);
}
xhr.onreadystatechange = function () {
if (xhr.readyState == XMLHttpRequest.DONE) {
that.response.emit(xhr.responseText)
xhr.onreadystatechange = function (): void {
if (xhr.readyState === XMLHttpRequest.DONE) {
that.response.emit(xhr.responseText);
}
}
};
if (this.options.formatDataFunctionIsAsync) {
sendable.then(
(result: any) => xhr.send(JSON.stringify(result))
@@ -424,7 +424,7 @@ export class FileUploader {
return this.options.queueLimit === undefined || this.queue.length < this.options.queueLimit;
}
protected async _isValidFile(file: FileLikeObject, filters: FilterFunction[], options: FileUploaderOptions, queueIndex: number) {
protected async _isValidFile(file: FileLikeObject, filters: FilterFunction[], options: FileUploaderOptions, queueIndex: number): Promise<boolean> {
this._failFilterIndex = -1;
for (const filter of filters) {