Skip to content

Commit

Permalink
Merge pull request #248 from Nosto/dependabot/npm_and_yarn/multi-9a37…
Browse files Browse the repository at this point in the history
…8e81aa

deps: bump react, react-dom and @types/react
  • Loading branch information
timowestnosto authored Dec 30, 2024
2 parents 37746a8 + 412e82a commit 7a67372
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 42 deletions.
54 changes: 19 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@
"dist",
"src"
],
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
"@nosto/nosto-js": "*"
"peerDependencies": {
"react": "^18.3.1 || ^19.0.0",
"react-dom": "^18.3.1 || ^19.0.0"
},
"devDependencies": {
"@nosto/nosto-js": "*",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/react": "^18.0.0",
"@types/react": "^19.0.2",
"@types/react-dom": "^18.0.0",
"@types/user-event": "^4.1.1",
"@vitejs/plugin-react": "^4.3.1",
Expand Down
5 changes: 3 additions & 2 deletions spec/nosto.load.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest"
import { render } from "@testing-library/react"
import "@testing-library/jest-dom/vitest"
import { NostoProvider, NostoHome } from "../src/index"
import { NostoProvider, NostoHome, Recommendation } from "../src/index"
import RecommendationComponent from "./renderer"

describe("Nosto client script", () => {
Expand Down Expand Up @@ -29,9 +29,10 @@ describe("Nosto client script", () => {
})

it("throws error on invalid recommendationComponent", () => {
type InvalidComponent = React.ReactElement<{ nostoRecommendation: Recommendation }>
expect(() => {
render(
<NostoProvider account="shopify-11368366139" recommendationComponent={true as unknown as React.ReactElement}>
<NostoProvider account="shopify-11368366139" recommendationComponent={true as unknown as InvalidComponent}>
<NostoHome />
</NostoProvider>
)
Expand Down

0 comments on commit 7a67372

Please sign in to comment.