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
baf8d2b5
Commit
baf8d2b5
authored
Jun 24, 2021
by
Kefas Satrio Bangkit Solideantyo
Browse files
[REFACTOR] fix failing test
parent
aa14a6d3
Pipeline
#83138
passed with stages
in 10 minutes and 20 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/scenes/report/ChooseWeekForClient/index.test.tsx
View file @
baf8d2b5
import
React
from
'
react
'
;
import
{
render
}
from
'
utils/testing
'
;
import
*
as
ROUTES
from
'
constants/routes
'
;
import
{
render
}
from
'
@testing-library/react-native
'
;
import
ChooseWeekForClient
from
'
.
'
;
const
mockedNavigate
=
jest
.
fn
();
jest
.
mock
(
'
@react-navigation/native
'
,
()
=>
{
return
{
useNavigation
:
()
=>
({
navigate
:
mockedNavigate
,
}),
};
});
describe
(
'
ChooseWeekForClient
'
,
()
=>
{
it
(
'
renders correctly
'
,
()
=>
{
render
(<
ChooseWeekForClient
/>
,
ROUTES
.
weeklyReportChooseWeek
);
render
(<
ChooseWeekForClient
/>);
});
});
src/scenes/report/ChooseWeekForNutritionist/index.test.tsx
View file @
baf8d2b5
import
React
from
'
react
'
;
import
{
render
}
from
'
utils/testing
'
;
import
*
as
ROUTES
from
'
constants/routes
'
;
import
{
render
}
from
'
@testing-library/react-native
'
;
import
ChooseWeekForNutritionist
from
'
.
'
;
describe
(
'
ChooseWeekForNutritionist
'
,
()
=>
{
it
(
'
renders correctly
'
,
()
=>
{
render
(
<
ChooseWeekForNutritionist
/>,
ROUTES
.
weeklyReportChooseWeekForNutritionist
,
{
routeParams
:
{
const
mockedNavigate
=
jest
.
fn
();
jest
.
mock
(
'
@react-navigation/native
'
,
()
=>
{
return
{
useNavigation
:
()
=>
({
navigate
:
mockedNavigate
,
}),
useRoute
:
()
=>
({
params
:
{
id
:
1
,
},
},
);
}),
};
});
describe
(
'
ChooseWeekForNutritionist
'
,
()
=>
{
it
(
'
renders correctly
'
,
()
=>
{
render
(<
ChooseWeekForNutritionist
/>);
});
});
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