Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2021
Kelas D
PT Gizi Sehat - Dietela
Dietela Mobile
Commits
5fe31b52
Commit
5fe31b52
authored
May 18, 2021
by
Doan Andreas Nathanael
Browse files
[RED] added test for client list admin
parent
95530f9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scenes/admin/ClientListAdmin/index.test.tsx
View file @
5fe31b52
import
React
from
'
react
'
;
import
{
render
}
from
'
utils/testing
'
;
import
*
as
ROUTES
from
'
constants/routes
'
;
import
axios
from
'
axios
'
;
import
ClientListAdmin
from
'
.
'
;
jest
.
mock
(
'
axios
'
);
const
mockAxios
=
axios
as
jest
.
Mocked
<
typeof
axios
>
;
describe
(
'
ClientListAdmin
'
,
()
=>
{
it
(
'
renders correctly
'
,
()
=>
{
it
(
'
renders correctly
'
,
async
()
=>
{
mockAxios
.
request
.
mockImplementationOnce
(()
=>
Promise
.
resolve
({
status
:
200
,
data
:
[],
}),
);
render
(<
ClientListAdmin
/>,
ROUTES
.
clientListForAdmin
);
});
});
Write
Preview
Supports
Markdown
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