1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-02 17:53:41 +00:00

fix tests

This commit is contained in:
jaasen-livefront
2025-11-20 10:23:46 -08:00
parent d09853ed9c
commit f58439ee10
2 changed files with 6 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ export class FolderExport {
}
static toDomain(req: FolderExport, domain = new FolderDomain()) {
domain.name = new EncString(req.name);
domain.name = req.name ? new EncString(req.name) : undefined;
return domain;
}

View File

@@ -154,12 +154,13 @@ function expectEqualFolderViews(folderViews: FolderView[] | Folder[], jsonResult
function expectEqualFolders(folders: Folder[], jsonResult: string) {
const actual = JSON.parse(jsonResult).folders;
const expected = folders.map((f) => ({
id: f.id,
name: f.name.encryptedString,
const expected = folders.map((c) => ({
id: c.id,
name: c.name?.encryptedString,
}));
expect(actual).toMatchObject(expected);
expect(actual.length).toBeGreaterThan(0);
expect(actual).toEqual(expected);
}
describe("VaultExportService", () => {