Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
c1b3efe5
Commit
c1b3efe5
authored
Oct 16, 2019
by
Ben Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected mocked function name
parent
8c30051b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
test/unit/components/navigation.test.jsx
test/unit/components/navigation.test.jsx
+4
-4
No files found.
test/unit/components/navigation.test.jsx
View file @
c1b3efe5
...
...
@@ -37,14 +37,14 @@ describe('Navigation', () => {
}
});
const
props
=
{
handle
RegistrationRequested
:
jest
.
fn
()
handle
ClickRegistration
:
jest
.
fn
()
};
const
navWrapper
=
getNavigationWrapper
(
props
);
const
navInstance
=
navWrapper
.
instance
();
// simulate click, with mocked event
navWrapper
.
find
(
'
a.registrationLink
'
).
simulate
(
'
click
'
,
{
preventDefault
()
{}});
expect
(
navInstance
.
props
.
handle
RegistrationRequested
).
toHaveBeenCalled
();
expect
(
navInstance
.
props
.
handle
ClickRegistration
).
toHaveBeenCalled
();
});
test
(
'
when using new join flow, clicking Join Scratch calls handleRegistrationRequested
'
,
()
=>
{
...
...
@@ -60,12 +60,12 @@ describe('Navigation', () => {
}
});
const
props
=
{
handle
RegistrationRequested
:
jest
.
fn
()
handle
ClickRegistration
:
jest
.
fn
()
};
const
navWrapper
=
getNavigationWrapper
(
props
);
const
navInstance
=
navWrapper
.
instance
();
navWrapper
.
find
(
'
a.registrationLink
'
).
simulate
(
'
click
'
,
{
preventDefault
()
{}});
expect
(
navInstance
.
props
.
handle
RegistrationRequested
).
toHaveBeenCalled
();
expect
(
navInstance
.
props
.
handle
ClickRegistration
).
toHaveBeenCalled
();
});
});
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