Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
710e3537
Commit
710e3537
authored
May 25, 2017
by
Luke "Jared" Bennett
Committed by
Phil Hughes
May 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use non-global jQuery reference within raven bundle
parent
ec2130be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
19 deletions
+2
-19
app/assets/javascripts/raven/raven_config.js
app/assets/javascripts/raven/raven_config.js
+2
-1
spec/javascripts/raven/raven_config_spec.js
spec/javascripts/raven/raven_config_spec.js
+0
-18
No files found.
app/assets/javascripts/raven/raven_config.js
View file @
710e3537
import
Raven
from
'
raven-js
'
;
import
Raven
from
'
raven-js
'
;
import
$
from
'
jquery
'
;
const
IGNORE_ERRORS
=
[
const
IGNORE_ERRORS
=
[
// Random plugins/extensions
// Random plugins/extensions
...
@@ -74,7 +75,7 @@ const RavenConfig = {
...
@@ -74,7 +75,7 @@ const RavenConfig = {
},
},
bindRavenErrors
()
{
bindRavenErrors
()
{
window
.
$
(
document
).
on
(
'
ajaxError.raven
'
,
this
.
handleRavenErrors
);
$
(
document
).
on
(
'
ajaxError.raven
'
,
this
.
handleRavenErrors
);
},
},
handleRavenErrors
(
event
,
req
,
config
,
err
)
{
handleRavenErrors
(
event
,
req
,
config
,
err
)
{
...
...
spec/javascripts/raven/raven_config_spec.js
View file @
710e3537
...
@@ -140,24 +140,6 @@ describe('RavenConfig', () => {
...
@@ -140,24 +140,6 @@ describe('RavenConfig', () => {
});
});
});
});
describe
(
'
bindRavenErrors
'
,
()
=>
{
let
$document
;
let
$
;
beforeEach
(()
=>
{
$document
=
jasmine
.
createSpyObj
(
'
$document
'
,
[
'
on
'
]);
$
=
jasmine
.
createSpy
(
'
$
'
).
and
.
returnValue
(
$document
);
window
.
$
=
$
;
RavenConfig
.
bindRavenErrors
();
});
it
(
'
should call .on
'
,
function
()
{
expect
(
$document
.
on
).
toHaveBeenCalledWith
(
'
ajaxError.raven
'
,
RavenConfig
.
handleRavenErrors
);
});
});
describe
(
'
handleRavenErrors
'
,
()
=>
{
describe
(
'
handleRavenErrors
'
,
()
=>
{
let
event
;
let
event
;
let
req
;
let
req
;
...
...
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