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

12 lines
360 B
TypeScript
Raw Normal View History

2017-02-28 14:02:56 -05:00
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);
}
};