File tree Expand file tree Collapse file tree 3 files changed +33
-8
lines changed Expand file tree Collapse file tree 3 files changed +33
-8
lines changed Original file line number Diff line number Diff line change 16
16
"chai" : " ~1.8.1" ,
17
17
"grunt" : " ~0.4.1" ,
18
18
"grunt-cli" : " ~0.1.9" ,
19
+ "grunt-contrib-clean" : " ~0.4.0" ,
20
+ "grunt-contrib-concat" : " ~0.3.0" ,
21
+ "grunt-contrib-connect" : " ~0.5.0" ,
22
+ "grunt-contrib-copy" : " ~0.4.1" ,
19
23
"grunt-contrib-jshint" : " ~0.6.3" ,
20
24
"grunt-contrib-uglify" : " ~0.2.2" ,
21
- "grunt-contrib-concat" : " ~0.3.0" ,
22
- "grunt-contrib-clean" : " ~0.4.0" ,
25
+ "grunt-gitinfo" : " ~0.1.1" ,
23
26
"grunt-mocha" : " ~0.4.1" ,
24
27
"grunt-release" : " ~0.6.0" ,
25
28
"grunt-s3" : " ~0.2.0-alpha.3" ,
26
- "grunt-gitinfo" : " ~0.1.1" ,
27
- "grunt-contrib-connect" : " ~0.5.0" ,
28
- "grunt-contrib-copy" : " ~0.4.1" ,
29
- "sinon" : " ~1.7.3" ,
30
- "lodash" : " ~2.4.0"
29
+ "jquery" : " ^2.1.4" ,
30
+ "lodash" : " ~2.4.0" ,
31
+ "sinon" : " ~1.7.3"
31
32
}
32
33
}
Original file line number Diff line number Diff line change 28
28
} ) ;
29
29
</ script >
30
30
31
+ <!-- Deps -->
32
+ < script src ="../node_modules/jquery/dist/jquery.js "> </ script >
33
+
31
34
<!-- Raven -->
32
35
< script src ="../vendor/TraceKit/tracekit.js "> </ script >
33
36
< script src ="../src/raven.js "> </ script >
37
+ < script src ="../plugins/jquery.js "> </ script >
34
38
35
39
<!-- Tests -->
36
40
< script src ="raven.test.js "> </ script >
41
+ < script src ="plugins/jquery.test.js "> </ script >
37
42
38
43
< script >
39
44
if ( ! window . PHANTOMJS ) {
53
58
54
59
runner . on ( 'end' , function ( ) {
55
60
runner . stats . failed = failed ;
56
- global . mochaResults = runner . stats ;
61
+ if ( typeof global !== "undefined" ) {
62
+ global . mochaResults = runner . stats ;
63
+ }
57
64
} ) ;
58
65
} ) ( mocha . run ( ) ) ;
59
66
}
Original file line number Diff line number Diff line change
1
+ describe ( 'jQuery' , function ( ) {
2
+ describe ( '.fn.ready' , function ( ) {
3
+ it ( 'captures exceptions #integration' , function ( ) {
4
+ var err = new Error ( 'foo' ) ;
5
+ this . sinon . stub ( Raven , 'captureException' )
6
+ try {
7
+ jQuery ( function ( ) {
8
+ throw err ;
9
+ } ) ;
10
+ } catch ( err2 ) {
11
+ if ( err2 !== err ) throw err2 ;
12
+ }
13
+ assert . isTrue ( Raven . captureException . called ) ;
14
+ assert . equal ( Raven . captureException . lastCall . args [ 0 ] , err ) ;
15
+ } ) ;
16
+ } ) ;
17
+ } ) ;
You can’t perform that action at this time.
0 commit comments