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
PMPL
Class Project
Kape
Commits
3c586268
Commit
3c586268
authored
Dec 06, 2019
by
hilyafesmia
Browse files
Menambah test untuk fungsi handleSelectChange
parent
9b7491ab
Pipeline
#26847
passed with stages
in 7 minutes and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
assets/js/__test__/components/CompanyRegisterModal-test.jsx
View file @
3c586268
import
React
from
'
react
'
;
import
ReactTestUtils
from
'
react-dom/test-utils
'
;
import
CompanyRegisterModal
from
'
../../components/CompanyRegisterModal
'
;
import
ReactDOM
from
'
react-dom
'
;
import
CompanyRegisterModal
from
'
../../components/CompanyRegisterModal
'
;
describe
(
'
CompanyRegisterModal
'
,
()
=>
{
let
container
;
...
...
@@ -70,4 +71,13 @@ describe('CompanyRegisterModal', () => {
expect
(
modal
.
state
.
email
).
to
.
equal
(
'
kape@kape.com
'
);
});
it
(
'
handle handleSelectChange without problem
'
,
()
=>
{
const
modal
=
ReactTestUtils
.
renderIntoDocument
(
<
CompanyRegisterModal
/>
);
modal
.
handleSelectChange
({},
{
name
:
'
category
'
,
value
:
'
kape@kape.com
'
});
expect
(
modal
.
state
.
category
).
to
.
equal
(
'
kape@kape.com
'
);
});
})
\ No newline at end of file
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