Skip to content

Commit

Permalink
fix structure
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchuhmacher committed Jan 22, 2024
1 parent ce07e77 commit 50e19a5
Showing 1 changed file with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ import { useExternalToolLaunchState } from "./ExternalToolLaunchState.composable

jest.mock("@data-external-tool/ExternalToolApi.composable");

Object.defineProperty(window, "location", {
configurable: true,
writable: false,
value: {
href: "",
},
});

describe("ExternalToolLaunchState.composable", () => {
let useExternalToolApiMock: DeepMocked<ReturnType<typeof useExternalToolApi>>;

Expand All @@ -25,13 +33,7 @@ describe("ExternalToolLaunchState.composable", () => {

afterEach(() => {
jest.clearAllMocks();
Object.defineProperty(window, "location", {
configurable: true,
writable: false,
value: {
href: "",
},
});
window.location.href = "";
});

describe("fetchLaunchRequest", () => {
Expand Down Expand Up @@ -238,10 +240,6 @@ describe("ExternalToolLaunchState.composable", () => {
});

describe("when the launch method is unknown", () => {
beforeEach(() => {
window.location.href = "";
});

const setup = () => {
const launchRequest = toolLaunchRequestFactory.build({
method: "unknown" as unknown as ToolLaunchRequestMethodEnum,
Expand Down

0 comments on commit 50e19a5

Please sign in to comment.