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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user