Showing 32 of 98 total issues
File packageMocksSpec.js
has 13174 lines of code (exceeds 250 allowed). Consider refactoring. Open
// goal: read JSON metadata for packages and create the mocks
// DEPENDS ON GLOBAL OBJECT: 'ComponentMocker'
var packageMetadata = {
"insecure": {},
File package-stubs.js
has 13154 lines of code (exceeds 250 allowed). Consider refactoring. Open
// DEPENDS ON GLOBAL OBJECT: 'ComponentMocker'
var packageMetadata = {
"insecure": {},
"base64": {
Function initJasmineJquery
has 652 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.initJasmineJquery = _.once(function () {
/*!
Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
File jasmine-jquery.js
has 654 lines of code (exceeds 250 allowed). Consider refactoring. Open
window.initJasmineJquery = _.once(function () {
/*!
Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
File jasmine-jquery.js
has 652 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
Version 2.1.0
Function initJasmineJquery
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
window.initJasmineJquery = _.once(function () {
/*!
Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function VelocityTestReporter
has 170 lines of code (exceeds 25 allowed). Consider refactoring. Open
VelocityTestReporter = function VelocityTestReporter(options) {
var self = this,
timer = options.timer || noopTimer,
ddpParentConnection = options.ddpParentConnection,
ancestors = [],
Function executeSpecsUnitMode
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
runTests: function executeSpecsUnitMode() {
Meteor.call('velocity/reports/reset', {framework: this.name})
if (this._getTestFilesCursor().count() === 0) {
this._reportCompleted()
Function KarmaVelocityReporter
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
function KarmaVelocityReporter(options) {
var ddpParentConnection = options.ddpParentConnection
var ancestors = []
var tc = options.tc
Function getKarmaConfig
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
getKarmaConfig: function () {
var files = [];
var proxies = {};
this._addPreAppFiles(files, proxies)
Function specDone
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.specDone = function (specResult) {
var skipped = specResult.status === 'disabled' || specResult.status === 'pending';
var time = skipped ? 0 : new Date().getTime() - specResult.startTime
var velocitySpecDone = function (callback) {
Function formatMessage
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formatMessage(messages) {
var out = '';
var already = {};
var indent = '';
File ClientUnitTestFramework.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* globals ClientUnitTestFramework: true, __meteor_runtime_config__: false */
var path = Npm.require('path');
var fs = Npm.require('fs');
var mkdirp = Npm.require('mkdirp');
Function getFiles
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function getFiles(dir, matcher) {
var allFiles = []
var stat;
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function executeSpecsUnitMode
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
runTests: function executeSpecsUnitMode() {
Meteor.call('velocity/reports/reset', {framework: this.name})
if (this._getTestFilesCursor().count() === 0) {
this._reportCompleted()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parse
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseStack.parse = function (err) {
var frames = err.stack.split('\n');
frames.shift(); // at least the first line is the exception
var stop = false;
Function _executeClientTests
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_executeClientTests: function (ddpConnection) {
var self = this;
window.ddpParentConnection = ddpConnection
Function saveTestResult
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
var saveTestResult = Meteor.bindEnvironment(function saveTestResult(test) {
var result = {
id: 'jasmine:' + self.mode + ' | ' + test.id,
//async: test.async,
framework: options.framework,
Function generateMocks
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateMocks: _.once(function () {
/*
Package = {
"meteor": {
Function createMirrorIframe
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
createMirrorIframe: function () {
var self = this
var iframeId = 'jasmine-mirror'
var getMirrorUrl = function (mirrorInfo) {