1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-18 01:03:26 +00:00

Add tests for domain models (#768)

This commit is contained in:
Oscar Hinton
2022-04-16 17:18:12 +02:00
committed by GitHub
parent f8ac1ed12b
commit 6bcadc4f40
23 changed files with 1933 additions and 6 deletions

View File

@@ -3,7 +3,6 @@ import { BaseResponse } from "../response/baseResponse";
export class SendFileApi extends BaseResponse {
id: string;
fileName: string;
key: string;
size: string;
sizeName: string;
@@ -14,7 +13,6 @@ export class SendFileApi extends BaseResponse {
}
this.id = this.getResponseProperty("Id");
this.fileName = this.getResponseProperty("FileName");
this.key = this.getResponseProperty("Key");
this.size = this.getResponseProperty("Size");
this.sizeName = this.getResponseProperty("SizeName");
}

View File

@@ -21,7 +21,6 @@ export class CipherData {
favorite: boolean;
revisionDate: string;
type: CipherType;
sizeName: string;
name: string;
notes: string;
login?: LoginData;

View File

@@ -3,7 +3,6 @@ import { SendFileApi } from "../api/sendFileApi";
export class SendFileData {
id: string;
fileName: string;
key: string;
size: string;
sizeName: string;
@@ -14,7 +13,6 @@ export class SendFileData {
this.id = data.id;
this.fileName = data.fileName;
this.key = data.key;
this.size = data.size;
this.sizeName = data.sizeName;
}

View File

@@ -11,7 +11,7 @@ export class Attachment extends Domain {
id: string;
url: string;
size: string;
sizeName: string;
sizeName: string; // Readable size, ex: "4.2 KB" or "1.43 GB"
key: EncString;
fileName: EncString;

View File

@@ -45,6 +45,7 @@ export class LoginUri extends Domain {
u,
{
uri: null,
match: null,
},
["match"]
);