How to use the jasmine-spec-reporter.DisplayProcessor function in jasmine-spec-reporter

To help you get started, we’ve selected a few jasmine-spec-reporter 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 cloudfoundry / stratos / src / test-e2e / time-reporter-plugin.js View on Github external
var diff = now - startTime;
     var msec = now - startTime;;
     var hh = Math.floor(msec / 1000 / 60 / 60);
     msec -= hh * 1000 * 60 * 60;
     var mm = Math.floor(msec / 1000 / 60);
     msec -= mm * 1000 * 60;
     var ss = Math.floor(msec / 1000);
     msec -= ss * 1000;
     return formatTwoDigit(hh) + ':' + formatTwoDigit(mm) + ':' + formatTwoDigit(ss);
   }

   function formatTwoDigit(number) {
     return number < 10 ? '0' + number : number;
   }

   TimeProcessor.prototype = new DisplayProcessor();

   TimeProcessor.prototype.displaySuite = function (suite, log) {
     return getTime() + ' - ' + log;
   };

   TimeProcessor.prototype.displaySuccessfulSpec = function (spec, log) {
     return getTime() + ' - ' + log;
   };

   TimeProcessor.prototype.displayFailedSpec = function (spec, log) {
     return getTime() + ' - ' + log;
   };

   TimeProcessor.prototype.displayPendingSpec = function (spec, log) {
     return getTime() + ' - ' + log;
   };

jasmine-spec-reporter

Spec reporter for jasmine behavior-driven development framework

Apache-2.0
Latest version published 4 years ago

Package Health Score

68 / 100
Full package analysis