How to use the jasmine-core/lib/console/console.js.ConsoleReporter function in jasmine-core

To help you get started, we’ve selected a few jasmine-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dmunch / couch-chakra / js / couch_chakra.js View on Github external
function initJasmine(context) {
  context.setTimeout = function(fn, delay, params) { fn.apply(this, params); };
  context.setInterval = function(fn, delay, params) { print('si');print(fn.toString());};
  context.clearInterval = function(fn, delay, params) { print('ci');print(fn.toString());};
  context.clearTimeout = function(fn, delay, params) { };

  var jasmine = jasmineRequire.core(jasmineRequire);
  var env = jasmine.getEnv();
  var jI = jasmineRequire.interface(jasmine, env);
  extend(context, jI);

  var CoRep = jasmineRequire_console.ConsoleReporter();
  env.addReporter(new CoRep({print: context.console.log, showColors: true}));

  env.specFilter = function(spec) {
    //print(spec.getFullName());
    //for (var property in spec) print(property); 
    return true;
  };

  function extend(destination, source) {
    for (var property in source) destination[property] = source[property];
    return destination;
  }
  return env;
}