1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-16838] Fix bad imports for shared and platform code (#12743)

Imports containing /src/ are forbidden.
This commit is contained in:
Oscar Hinton
2025-01-08 14:29:26 +01:00
committed by GitHub
parent 244539cc38
commit 3949aae8e3
6 changed files with 20 additions and 16 deletions

View File

@@ -1,14 +1,18 @@
import { mock } from "jest-mock-extended";
import { firstValueFrom, Observable } from "rxjs";
// FIXME: remove `/apps` import from `/libs`
// eslint-disable-next-line import/no-restricted-paths
import { flushPromises } from "@bitwarden/browser/src/autofill/spec/testing-utils";
import { Fido2CredentialView } from "../../../vault/models/view/fido2-credential.view";
import { Fido2ActiveRequestManager } from "./fido2-active-request-manager";
// Duplicated from `apps/browser/src/autofill/spec/testing-utils.ts`.
const scheduler = typeof setImmediate === "function" ? setImmediate : setTimeout;
function flushPromises() {
return new Promise(function (resolve) {
scheduler(resolve);
});
}
jest.mock("rxjs", () => {
const rxjs = jest.requireActual("rxjs");
const { firstValueFrom } = rxjs;