Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await Promise.all([
// 通用函数测试
import('./tests/function/test'),
// string类型组件测试
import('./tests/string/test'),
// number类型组件测试
import('./tests/number/test'),
// boolean类型组件测试
import('./tests/boolean/test'),
// array类型组件测试
import('./tests/array/test'),
// object类型组件测试
import('./tests/object/test')
]);
mocha.run();
})();
var mocha = require('mocha')
mocha.setup('bdd')
require('./index.test.js')
mocha.run(function () {
window.scrollTo(0,0)
console.log('Done!')
})
require(['test.js', 'jquery', 'jquery-csv'], function (require, $, csv) {
$.csv = csv;
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
mocha.run();
}
});
});
function (require) {
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
}
else {
mocha.run();
}
}
);
, key = pair.slice(0, i)
, val = pair.slice(++i);
obj[key] = decodeURIComponent(val);
return obj;
}, {});
}
mocha.setup = function(ui){
ui = mocha.interfaces[ui];
if (!ui) throw new Error('invalid mocha interface "' + ui + '"');
ui(suite);
suite.emit('pre-require', global);
};
mocha.run = function(){
suite.emit('run');
var runner = new mocha.Runner(suite);
var reporter = new Reporter(runner);
var query = parse(window.location.search || "");
if (query.grep) runner.grep(new RegExp(query.grep));
runner.run();
};
})();
* http://chaijs.com/api/
*
* */
var mocha = require('mocha'),
chai = require('chai'),
chaiJquery = require('chai-jquery');
require('./tests/routes.spec.js');
require('./tests/context.spec.js');
require('./tests/models.spec.js');
require('./tests/utils.spec.js');
require('./tests/objects.spec.js');
chai.use(chaiJquery);
mocha.run();