Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
3100b3e2
Commit
3100b3e2
authored
Jun 13, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more tests
parent
958a8131
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
329 additions
and
27 deletions
+329
-27
launch.json
.vscode/launch.json
+25
-0
next-router.ts
jest/mocks/next-router.ts
+1
-1
useQueryWithPages.test.tsx
ui/shared/pagination/useQueryWithPages.test.tsx
+303
-26
No files found.
.vscode/launch.json
0 → 100644
View file @
3100b3e2
{
//
Use
IntelliSense
to
learn
about
possible
attributes.
//
Hover
to
view
descriptions
of
existing
attributes.
//
For
more
information
,
visit:
https://go.microsoft.com/fwlink/?linkid=
830387
"version"
:
"0.2.0"
,
"configurations"
:
[
{
"type"
:
"node"
,
"request"
:
"launch"
,
"name"
:
"Jest: watch current file"
,
"program"
:
"${workspaceFolder}/node_modules/jest/bin/jest"
,
"args"
:
[
"${fileBasename}"
,
"--runInBand"
,
"--verbose"
,
"-i"
,
"--no-cache"
,
"--watchAll"
,
"--testTimeout=1000000000"
,
],
"console"
:
"integratedTerminal"
,
"internalConsoleOptions"
:
"neverOpen"
}
]
}
\ No newline at end of file
jest/mocks/next-router.ts
View file @
3100b3e2
...
@@ -2,7 +2,7 @@ import type { NextRouter } from 'next/router';
...
@@ -2,7 +2,7 @@ import type { NextRouter } from 'next/router';
export
const
router
=
{
export
const
router
=
{
query
:
{},
query
:
{},
push
:
jest
.
fn
(),
push
:
jest
.
fn
(
()
=>
Promise
.
resolve
()
),
};
};
export
const
useRouter
=
jest
.
fn
<
unknown
,
Array
<
Partial
<
NextRouter
>>>
(()
=>
(
router
));
export
const
useRouter
=
jest
.
fn
<
unknown
,
Array
<
Partial
<
NextRouter
>>>
(()
=>
(
router
));
...
...
ui/shared/pagination/useQueryWithPages.test.tsx
View file @
3100b3e2
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment