Skip to content

Commit

Permalink
Merge branch 'master' of github.com:visionmedia/mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 19, 2012
2 parents 8e5cc0a + a1ca706 commit 6e72bb7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions support/tail.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ window.mocha = require('mocha');

// boot
;(function(){
var suite = new mocha.Suite('', new mocha.Context)
, utils = mocha.utils
var utils = mocha.utils
, options = {}

mocha.suite = new mocha.Suite('', new mocha.Context());

/**
* Highlight the given string of `js`.
*/
Expand Down Expand Up @@ -124,18 +125,18 @@ window.mocha = require('mocha');

ui = mocha.interfaces[options.ui];
if (!ui) throw new Error('invalid mocha interface "' + ui + '"');
if (options.timeout) suite.timeout(options.timeout);
ui(suite);
suite.emit('pre-require', window);
if (options.timeout) mocha.suite.timeout(options.timeout);
ui(mocha.suite);
mocha.suite.emit('pre-require', window);
};

/**
* Run mocha, returning the Runner.
*/

mocha.run = function(fn){
suite.emit('run');
var runner = new mocha.Runner(suite);
mocha.suite.emit('run');
var runner = new mocha.Runner(mocha.suite);
var Reporter = options.reporter || mocha.reporters.HTML;
var reporter = new Reporter(runner);
var query = parse(window.location.search || "");
Expand Down
4 changes: 2 additions & 2 deletions test/jsapi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var Mocha = require('../../')

var mocha = new Mocha({
ui: 'bdd',
globals: ['okGlobalA', 'okGlobalB', 'okGlobalC'],
globals: ['okGlobalA', 'okGlobalB', 'okGlobalC', 'callback*'],
// ignoreLeaks: true,
growl: true
});
Expand All @@ -28,4 +28,4 @@ mocha.run(function(){
console.log('done');
}).on('pass', function(test){
// console.log('... %s', test.title);
});
});

0 comments on commit 6e72bb7

Please sign in to comment.