close

DEV Community

Peter Jacxsens profile picture

Peter Jacxsens

Front-end developer

Location Belgium Joined Joined on  github website twitter website

Education

self taught

Mocking Next 16 useParams, useSearchParams, usePathname and useRouter in Jest

Mocking Next 16 useParams, useSearchParams, usePathname and useRouter in Jest

Comments
9 min read

Want to connect with Peter Jacxsens?

Create an account to connect with Peter Jacxsens. You can also sign in below to proceed if you already have an account.

Already have an account? Sign in
Mocking async params and searchParams in Next 16 using Jest and React Testing Library

Mocking async params and searchParams in Next 16 using Jest and React Testing Library

Comments
6 min read
Setting up Jest, jest-dom, React Testing Library + linting for Next 16

Setting up Jest, jest-dom, React Testing Library + linting for Next 16

Image 1
Comments
5 min read
An example of using async params and async searchParams in Next 16

An example of using async params and async searchParams in Next 16

Comments
5 min read
Async params and searchParams in Next 16

Async params and searchParams in Next 16

Comments
3 min read
How to test if a mocked component receives the correct props in Jest and RTL (new since React 19)

How to test if a mocked component receives the correct props in Jest and RTL (new since React 19)

Comments
3 min read
5. Mocking usePathName, useSearchParams and useRouter with Jest in Next 15

5. Mocking usePathName, useSearchParams and useRouter with Jest in Next 15

Image 1
Comments 1
11 min read
4. Testing (async) searchParams with Jest in Next 15

4. Testing (async) searchParams with Jest in Next 15

Image 1
Comments
6 min read
3. How to setup Jest in a Next 15 project (+ eslint for testing)

3. How to setup Jest in a Next 15 project (+ eslint for testing)

Image 3
Comments 1
6 min read
2. An example of using searchParams, useSearchParams and Next router in Next 15

2. An example of using searchParams, useSearchParams and Next router in Next 15

Image 2
Comments
4 min read
1. Synchronous and asynchronous searchParams in Next 15

1. Synchronous and asynchronous searchParams in Next 15

Image 9
Comments
4 min read
21/ NextAuth + Strapi: Final pieces and conclusion

21/ NextAuth + Strapi: Final pieces and conclusion

Image Image Image 12
Comments 9
4 min read
20/ Change password flow in Strapi and NextAuth CredentialsProvider

20/ Change password flow in Strapi and NextAuth CredentialsProvider

Image Image Image 5
Comments
7 min read
19/ Updating the userdata in Strapi and NextAuth

19/ Updating the userdata in Strapi and NextAuth

Comments
9 min read
18/ Edit username form and custom Strapi route and controller

18/ Edit username form and custom Strapi route and controller

Image 2
Comments 3
8 min read
17/ Change password flow in Strapi and NextAuth

17/ Change password flow in Strapi and NextAuth

Image 2
Comments
5 min read
16/ Forgot password flow with Strapi and NextAuth

16/ Forgot password flow with Strapi and NextAuth

Image 5
Comments
10 min read
15/ Sending email confirmations in Strapi

15/ Sending email confirmations in Strapi

Image 10
Comments 2
10 min read
14/ Signing up with NextAuth CredentialsProvider using server actions and useFormState

14/ Signing up with NextAuth CredentialsProvider using server actions and useFormState

Image Image Image 10
Comments
7 min read
13/ Signing up with the NextAuth CredentialsProvider

13/ Signing up with the NextAuth CredentialsProvider

Image Image Image 12
Comments
6 min read
12/ Error handling in our form component for the NextAuth CredentialsProvider

12/ Error handling in our form component for the NextAuth CredentialsProvider

Image Image 3
Comments
6 min read
11/ How to handle errors in the NextAuth authorize function / CredentialsProvider

11/ How to handle errors in the NextAuth authorize function / CredentialsProvider

Image 15
Comments
6 min read
10/ NextAuth CredentialsProvider: signing in

10/ NextAuth CredentialsProvider: signing in

Image Image 5
Comments
9 min read
9/ How to add error handling to NextAuth GoogleProvider

9/ How to add error handling to NextAuth GoogleProvider

Image Image Image 29
Comments
9 min read
8/ Using NextAuth GoogleProvider to put a user into the Strapi database

8/ Using NextAuth GoogleProvider to put a user into the Strapi database

Image Image 8
Comments 1
9 min read
7/ NextAuth callback functions explained

7/ NextAuth callback functions explained

Image 21
Comments 2
7 min read
6/ NextAuth: creating a custom login page

6/ NextAuth: creating a custom login page

Image 24
Comments 1
8 min read
5/ NextAuth with GoogleProvider: sessions

5/ NextAuth with GoogleProvider: sessions

Image Image Image 8
Comments
5 min read
4/ NextAuth with GoogleProvider: signing in

4/ NextAuth with GoogleProvider: signing in

Image Image Image 11
Comments 1
6 min read
3/ NextAuth v4: introduction

3/ NextAuth v4: introduction

Image Image Image 15
Comments
4 min read
2/ Next + NextAuth + Strapi: setting up our project

2/ Next + NextAuth + Strapi: setting up our project

Image Image 10
Comments
5 min read
1/ Full guide for authentication with Next 14 + NextAuth 4 + Strapi v4 using Google and credentials provider

1/ Full guide for authentication with Next 14 + NextAuth 4 + Strapi v4 using Google and credentials provider

Image 59
Comments
2 min read
Suspense, client components and static rendering in Next 13

Suspense, client components and static rendering in Next 13

Image 3
Comments 4
7 min read
Using loading.js and Suspense in Next 13

Using loading.js and Suspense in Next 13

Image 10
Comments
9 min read
How to mock useSearchParams() and useRouter() with Jest in Next 13 (next/navigation)

How to mock useSearchParams() and useRouter() with Jest in Next 13 (next/navigation)

Image Image Image 21
Comments 3
7 min read
How to mock URLSearchParams and searchParams with Jest

How to mock URLSearchParams and searchParams with Jest

Image Image 7
Comments
6 min read
Using searchParams, useSearchParams and useRouter in Next 13

Using searchParams, useSearchParams and useRouter in Next 13

Image 30
Comments 2
7 min read
8./ Conclusion: client and server components in static and dynamic routes in Next 13

8./ Conclusion: client and server components in static and dynamic routes in Next 13

Image Image Image 12
Comments 2
2 min read
6./ Nesting client and server components in Next 13

6./ Nesting client and server components in Next 13

Image Image Image 12
Comments 5
5 min read
7./ The useSearchParams hook in Next 13

7./ The useSearchParams hook in Next 13

Image Image Image 10
Comments 2
9 min read
5./ Dynamic and static rendering of client and server components

5./ Dynamic and static rendering of client and server components

Image Image Image 10
Comments 2
6 min read
4./ Client components in static and dynamic routes before Next 13

4./ Client components in static and dynamic routes before Next 13

Image Image Image 7
Comments
6 min read
3./ Static and dynamic rendering in Next 13

3./ Static and dynamic rendering in Next 13

Image Image Image 12
Comments 2
4 min read
2./ Client and server components in Next 13

2./ Client and server components in Next 13

Image Image Image 13
Comments 1
4 min read
1./ A deep dive into client and server component versus static and dynamic rendering in Next 13: Intro

1./ A deep dive into client and server component versus static and dynamic rendering in Next 13: Intro

Image Image Image 6
Comments
2 min read
How to test a component passed as prop with Jest

How to test a component passed as prop with Jest

Image 12
Comments
5 min read
3 tips for setting up Jest and rtl for Next.js

3 tips for setting up Jest and rtl for Next.js

Image 2
Comments
3 min read
How to mock Next router with Jest

How to mock Next router with Jest

Image Image Image 37
Comments 5
8 min read
Setting up tests with mocks and more mocking examples (Jest mocking + React part 4)

Setting up tests with mocks and more mocking examples (Jest mocking + React part 4)

Image 5
Comments
8 min read
Returning values from mocks (Jest mocking + React part 3)

Returning values from mocks (Jest mocking + React part 3)

Image 6
Comments
10 min read
Mocking React components (Jest mocking + React part 2)

Mocking React components (Jest mocking + React part 2)

Image Image Image 26
Comments 10
8 min read
Introduction to Jest mocking (Jest mocking + React part 1)

Introduction to Jest mocking (Jest mocking + React part 1)

Image Image 21
Comments
8 min read
Lessons I learned as a Jest and React Testing Library beginner

Lessons I learned as a Jest and React Testing Library beginner

Image 3
Comments
7 min read
using google-api-javascript-client (gapi) with no authentication [code example]

using google-api-javascript-client (gapi) with no authentication [code example]

Image Image 8
Comments
1 min read
Customizing Yoast SEO's structured data with schema API part 4

Customizing Yoast SEO's structured data with schema API part 4

Image Image 7
Comments
6 min read
Customizing Yoast SEO's structured data with schema API part 3

Customizing Yoast SEO's structured data with schema API part 3

Image Image 10
Comments 2
7 min read
Customizing Yoast SEO's structured data with schema API part 2

Customizing Yoast SEO's structured data with schema API part 2

Image Image 7
Comments 2
4 min read
Customizing Yoast SEO's structured data with schema API part 1

Customizing Yoast SEO's structured data with schema API part 1

Image Image 8
Comments
4 min read
loading...