mirror of
https://github.com/bitwarden/browser
synced 2026-02-02 17:53:41 +00:00
fix tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user