This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,6 @@ Runner.prototype.runMocha_ = function(specs, done) {
119
119
mocha = new Mocha ( this . config_ . mochaOpts ) ,
120
120
self = this ;
121
121
122
-
123
122
// Mocha doesn't set up the ui until the pre-require event, so
124
123
// wait until then to load mocha-webdriver adapters as well.
125
124
mocha . suite . on ( 'pre-require' , function ( ) {
@@ -129,8 +128,13 @@ Runner.prototype.runMocha_ = function(specs, done) {
129
128
global . before = mochaAdapters . before ;
130
129
global . beforeEach = mochaAdapters . beforeEach ;
131
130
131
+ // The implementation of mocha's it.only uses global.it, so since that has
132
+ // already been wrapped we must avoid wrapping it a second time.
133
+ // See Mocha.prototype.loadFiles and bdd's context.it.only for more details.
134
+ var originalOnly = global . it . only ;
132
135
global . it = mochaAdapters . it ;
133
- global . it . only = global . iit = mochaAdapters . it . only ;
136
+ global . it . only = global . iit = originalOnly ;
137
+
134
138
global . it . skip = global . xit = mochaAdapters . xit ;
135
139
} ) ;
136
140
Original file line number Diff line number Diff line change 26
26
"chai" : " ~1.8.1" ,
27
27
"chai-as-promised" : " ~4.1.0" ,
28
28
"jasmine-reporters" : " ~0.2.1" ,
29
- "mocha" : " ~1.16 .0" ,
29
+ "mocha" : " ~1.18 .0" ,
30
30
"cucumber" : " ~0.3.3" ,
31
31
"express" : " ~3.3.4" ,
32
32
"lodash" : " ~2.4.1" ,
You can’t perform that action at this time.
0 commit comments