1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-05 19:23:19 +00:00

updated test cases and services using the config service

This commit is contained in:
gbubemismith
2023-09-09 23:22:18 -04:00
parent 88b7511124
commit 520628c99b
2 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ describe("FidoAuthenticatorService", () => {
authenticator = mock<Fido2AuthenticatorService>();
configService = mock<ConfigServiceAbstraction>();
client = new Fido2ClientService(authenticator, configService);
configService.getFeatureFlagBool.mockResolvedValue(true);
configService.getFeatureFlag.mockResolvedValue(true);
});
describe("createCredential", () => {
@@ -197,7 +197,7 @@ describe("FidoAuthenticatorService", () => {
it("should throw FallbackRequestedError if feature flag is not enabled", async () => {
const params = createParams();
configService.getFeatureFlagBool.mockResolvedValue(false);
configService.getFeatureFlag.mockResolvedValue(false);
const result = async () => await client.createCredential(params);
@@ -335,7 +335,7 @@ describe("FidoAuthenticatorService", () => {
it("should throw FallbackRequestedError if feature flag is not enabled", async () => {
const params = createParams();
configService.getFeatureFlagBool.mockResolvedValue(false);
configService.getFeatureFlag.mockResolvedValue(false);
const result = async () => await client.assertCredential(params);

View File

@@ -35,7 +35,7 @@ export class Fido2ClientService implements Fido2ClientServiceAbstraction {
) {}
async isFido2FeatureEnabled(): Promise<boolean> {
return await this.configService.getFeatureFlagBool(FeatureFlag.Fido2VaultCredentials);
return await this.configService.getFeatureFlag<boolean>(FeatureFlag.Fido2VaultCredentials);
}
async createCredential(