mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
Increase error checking on imported Login items (#369)
* Increase error checking on imported Login items * Check encKey when importing encrypted JSON * Fix style, use GUID as random string for test * Revert "Increase error checking on imported Login items" This reverts commit 17294527863cc53b84ed218f94ffbc21f4e96260. * fix linting * Fix tests
This commit is contained in:
@@ -2,6 +2,7 @@ import { Substitute, SubstituteOf } from '@fluffy-spoon/substitute';
|
||||
|
||||
import { ApiService } from '../../../src/abstractions/api.service';
|
||||
import { CipherService } from '../../../src/abstractions/cipher.service';
|
||||
import { CryptoService } from '../../../src/abstractions/crypto.service';
|
||||
import { FolderService } from '../../../src/abstractions/folder.service';
|
||||
|
||||
import { ExportService } from '../../../src/services/export.service';
|
||||
@@ -74,16 +75,18 @@ describe('ExportService', () => {
|
||||
let apiService: SubstituteOf<ApiService>;
|
||||
let cipherService: SubstituteOf<CipherService>;
|
||||
let folderService: SubstituteOf<FolderService>;
|
||||
let cryptoService: SubstituteOf<CryptoService>;
|
||||
|
||||
beforeEach(() => {
|
||||
apiService = Substitute.for<ApiService>();
|
||||
cipherService = Substitute.for<CipherService>();
|
||||
folderService = Substitute.for<FolderService>();
|
||||
cryptoService = Substitute.for<CryptoService>();
|
||||
|
||||
folderService.getAllDecrypted().resolves([]);
|
||||
folderService.getAll().resolves([]);
|
||||
|
||||
exportService = new ExportService(folderService, cipherService, apiService);
|
||||
exportService = new ExportService(folderService, cipherService, apiService, cryptoService);
|
||||
});
|
||||
|
||||
it('exports unecrypted user ciphers', async () => {
|
||||
|
||||
Reference in New Issue
Block a user