Fix test
This commit is contained in:
parent
683f19b5c0
commit
ef5ad07c1e
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,8 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
|
|||
|
||||
// mock document.referrer
|
||||
const origin = "http://example.com";
|
||||
const domain = "saleor.domain.host";
|
||||
|
||||
Object.defineProperty(window.document, "referrer", {
|
||||
value: origin,
|
||||
writable: true,
|
||||
|
@ -10,7 +12,7 @@ Object.defineProperty(window.document, "referrer", {
|
|||
|
||||
Object.defineProperty(window, "location", {
|
||||
value: {
|
||||
href: `${origin}?domain=saleor.domain&id=appid`,
|
||||
href: `${origin}?domain=${domain}&id=appid`,
|
||||
},
|
||||
writable: true,
|
||||
});
|
||||
|
@ -27,7 +29,6 @@ const handshakeEvent: HandshakeEvent = {
|
|||
};
|
||||
|
||||
describe("AppBridge", () => {
|
||||
const domain = "saleor.domain.host";
|
||||
let appBridge = new AppBridge();
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
Loading…
Reference in a new issue