Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
done: function(error, window) {
if (argv.v) {
jsdom.getVirtualConsole(window).sendTo(console);
}
if (error) {
console.log("Error loading functional testing environment: ");
console.log(error);
console.log();
reject(error)
}
// TODO add handlebarsUtils import function to window/ on torso. then here, add handlebars from window to handlebarsUtils
window.Torso.Utils.handlebarsUtils(window.Handlebars);
// This sync is needed because TestView.js imports a compiled .hbs file outside of the window's scope so it uses a different
// Set of handlebars helpers.
window._.each(window.Handlebars.helpers, function(helperFunction, helperName) {
handlebars.registerHelper(helperName, helperFunction);
});
created: function(error, window) {
if (error) {
cb([error]);
} else {
jsdom.getVirtualConsole(window).sendTo(console);
window.addEventListener('error', function(evt) {
/* eslint-disable no-console */
console.error(
'In ' + evt.filename + '\n' +
'at line ' + evt.lineno + ' (relative to start of script), col ' + evt.colno + ':');
/* eslint-enable no-console */
errors.push(evt.error);
});
}
},
onload: function(window) {
done: function(error, window) {
if (argv.v) {
jsdom.getVirtualConsole(window).sendTo(console);
}
if (error) {
console.log("Error loading import testing environment: ");
console.log(error);
console.log();
reject(error)
}
resolve(window);
}
});
created: function(error, window){
jsdom.getVirtualConsole(window).sendTo(console);
},
done: function(errors, win){
created: function (createdErr, window) {
if (createdErr) {
grunt.log.error(createdErr);
return done(createdErr);
}
jsdom.getVirtualConsole(window).on('log', function (msg) {
console.log('jsdom:', msg);
});
window.isJsdom = true;
window.onTestsComplete = function (onTestsCompleteErr, results) {
if (onTestsCompleteErr) {
grunt.log.error(onTestsCompleteErr);
return done(onTestsCompleteErr);
}
var $ = window.$;
var resultText = $('#nodeunit-testresult').text();
grunt.log[err ? 'error' : 'ok'](resultText);
created: function created(e, window) {
jsdom.getVirtualConsole(window).sendTo(console);
window.noripple = true;
},
done: function done(e, window) {
, created: function(e, window){
jsdom.getVirtualConsole(window).sendTo(console)
window.noripple = true
}
, done: function(e, window){