blob: 1abc90c1d9a3a8ddd81ee4c0e6c8ce0b58c6aee5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
$(function(){
//allow cross iframe access
if ((!$.browser.msie) && (!($.browser.mozilla && $.browser.version.indexOf("1.8.") == 0))) {
document.domain = document.domain; // for comet
}
//http://stackoverflow.com/questions/1403888/get-url-parameter-with-jquery
var getURLParameter = function (name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
);
}
//get the list of specs and filter it if requested
var specs = specs_list.slice();
//inject spec scripts into the dom
var $body = $('body');
$.each(specs, function(i, spec){
$body.append('<script src="specs/' + spec + '"></script>')
});
//initalize the test helper
helper.init(function(){
//configure and start the test framework
//mocha.suite.timeout(5000);
var grep = getURLParameter("grep");
if(grep != "null"){
mocha.grep(grep);
}
mocha.ignoreLeaks();
mocha.run();
});
});
|