angular-cn/aio/aio-builds-setup/dockerbuild/scripts-js/test/upload-server/helpers.ts

12 lines
360 B
TypeScript

import {UploadError} from '../../lib/upload-server/upload-error';
export const expectToBeUploadError = (actual: UploadError, status?: number, message?: string) => {
expect(actual).toEqual(jasmine.any(UploadError));
if (status != null) {
expect(actual.status).toBe(status);
}
if (message != null) {
expect(actual.message).toBe(message);
}
};