Skip to content

Commit

Permalink
Merge nosto.reload.spec with nosto.load.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
nosto-mikpou committed Aug 15, 2024
1 parent c33b882 commit b5d1f5f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
15 changes: 13 additions & 2 deletions spec/nosto.load.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ import { render } from "@testing-library/react"
import { NostoProvider, NostoHome } from "../src/index"

describe("Nosto client script loading", () => {
it.todo("is stopped via provider when the script is loaded externally")
it("verify Nosto is not loaded twice", () => {
// @ts-expect-error dummy placeholder for Nosto iframe window scope
window.nosto = {}

it("is loaded", () => {
render(
<NostoProvider account="shopify-11368366139">
<NostoHome />
</NostoProvider>
)

expect(document.querySelector("[nosto-client-script]")).not.toBeInTheDocument()
})

it("is loaded", () => {
render(
<NostoProvider account="shopify-11368366139">
<NostoHome />
Expand Down
17 changes: 0 additions & 17 deletions spec/nosto.reload.spec.tsx

This file was deleted.

0 comments on commit b5d1f5f

Please sign in to comment.