Showing 36 of 66 total issues
File jaribu.js
has 496 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
if (typeof define !== 'function') {
var define = require('amdefine')(module);
}
define([ 'jaribu/colors', 'jaribu/display', 'jaribu/tools/Env',
Function connect
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
WebSocketClient.prototype.connect = function (onComplete) {
var client = new WebSocket.client();
var self = this;
client.on('connectFailed', function (error) {
File display.js
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
if (typeof define !== 'function') {
var define = require('amdefine')(module);
}
define(['jaribu/colors'], function (colors, undefined) {
Function isEqual
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function isEqual(a, b) {
if (b === undefined) { return false; }
var p;
if (Array.isArray(a)) {
if (!Array.isArray(b)) {
Function fail
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fail(part, suiteIndex, testIndex, msg) {
if (typeof testIndex === 'string') {
msg = testIndex;
testIndex = undefined;
}
Function pass
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function pass(part, suiteIndex, testIndex) {
var o;
var isSuite = false;
if (typeof testIndex === 'number') {
Function run
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Throws.prototype.run = function (func, expected, message) {
if (typeof func !== 'function') {
throw new Error('throws takes at least one parameter, a function to run.');
}
Function executeTest
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function executeTest(part, local, suiteIndex, testIndex) {
//
// we run the test in the next tick so that the function returns and
// we don't build up the call stack
//
Function buildTestObj
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildTestObj(env, s, t) {
if (! t.desc ) {
err_msg = s.name + ": test '" + t.name +
"'' requires a 'desc' property";
return false;
Function run
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
WebSocketServer.prototype.run = function (callback) {
var WebSocketServer = require('websocket').server;
var http = requirejs('http');
var messages = this.messages;
var port = this.port;
Function waitResult
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function waitResult(part, suiteIndex, testIndex, local) {
// this is function calls itself after a set interval, checking the
// status of the test via. the result property.
// result is initialized as undefined, and the test is not complete
// until it is 'true' or 'false'.
Function loadSuite
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pub.loadSuite = function (s) {
if (! s.desc ) {
err_msg = '... suite requires a \'desc\' property';
return false;
} else if (! s.tests ) {
Function json
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
json: (function () {
var lPromise = (typeof Promise !== 'undefined') ? Promise : helpers.pub.fetch.Promise;
function status(response) {
if (response.status >= 200 && response.status < 300) {
Function run
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
HttpServer.prototype.run = function (callback) {
var key;
var express = requirejs('express');
var bodyParser = requirejs('body-parser');
Function _waitResult
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(function _waitResult() {
if (processed) {
console.log('test processed, aborting waitResult');
return;
} else if (local.result() === undefined) {
Function getTestSummary
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getTestSummary(summary, suite) {
// iterate through tests for this suite, populating the summary
for (var i = 0, len = suite.tests.length; i < len; i++) {
var t = suite.tests[i];
var types = [ 'setup', 'takedown', 'beforeEach', 'afterEach' ];
Function assert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pub.assert = function (one, two, customMsg) {
customMsg = customMsg ? (' -- ' + customMsg) : '';
var args = Array.prototype.slice.call(arguments);
var self = arguments.callee;
if (typeof one === 'undefined') {
Function console
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
console: function (summary) {
var i, o;
var failedScaffoldingLength = summary.scaffolding.failObjs.length;
if (failedScaffoldingLength > 0) {
process.stdout.write("\nfailed scaffolding:");
Function browser
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
browser: function (summary) {
var i, o;
var failedScaffoldingLength = summary.scaffolding.failObjs.length;
if (failedScaffoldingLength > 0) {
__browserWrite("<br />failed scaffolding:");
Function run
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function run(part, suiteIndex, testIndex) {
var local;
var o;
var isSuite = true;