File objects.spec.js
has 885 lines of code (exceeds 250 allowed). Consider refactoring.
import chai from 'chai'
import * as F from '../src'
import _ from 'lodash/fp'
chai.expect()
File tree.spec.js
has 636 lines of code (exceeds 250 allowed). Consider refactoring.
import chai from 'chai'
import * as F from '../src'
import _ from 'lodash/fp'
import Promise from 'bluebird'
Similar blocks of code found in 2 locations. Consider refactoring.
let tree = {
type: 'object',
additionalProperties: false,
required: ['email', 'subscriptionType'],
properties: {
Similar blocks of code found in 2 locations. Consider refactoring.
expect(result).to.deep.equal({
bsonType: 'object',
additionalProperties: false,
required: ['email', 'subscriptionType'],
properties: {
Similar blocks of code found in 2 locations. Consider refactoring.
it('matchesBy', () => {
const test = F.matchesBy({
a: (x) => x > 1,
b: (x) => x == 2,
Similar blocks of code found in 2 locations. Consider refactoring.
it('matchesBySome', () => {
const test = F.matchesBySome({
a: (x) => x > 1,
b: (x) => x == 5,
Similar blocks of code found in 2 locations. Consider refactoring.
it('flip', () => {
let x = {
a: 1,
}
F.flip('a', x)()
Similar blocks of code found in 2 locations. Consider refactoring.
it('on', () => {
let x = {
a: 1,
}
F.on('a', x)()
Function exports
has 70 lines of code (exceeds 25 allowed). Consider refactoring.
module.exports = function (config) {
'use strict'
let browsers
let reporters
Function getDocs
has 66 lines of code (exceeds 25 allowed). Consider refactoring.
let getDocs = async () => {
let jsDocToJson = _.flow(
_.reject('undocumented'),
_.reject({ kind: 'module' }),
_.reject({ access: 'private' }),
File lens.spec.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring.
import chai from 'chai'
import _ from 'lodash/fp'
import * as F from '../src'
chai.expect()
Similar blocks of code found in 2 locations. Consider refactoring.
it('domLens.hover', () => {
let state = {
hovering: false,
}
let props = F.domLens.hover('hovering', state)
Similar blocks of code found in 2 locations. Consider refactoring.
it('domLens.focus', () => {
let state = {
focusing: false,
}
let props = F.domLens.focus('focusing', state)
Similar blocks of code found in 2 locations. Consider refactoring.
expect(
F.simpleDiffArray(
{
x: 1,
a: 3,
Similar blocks of code found in 2 locations. Consider refactoring.
expect(
F.simpleDiff(
{
x: 1,
a: 3,
Similar blocks of code found in 2 locations. Consider refactoring.
it('hasIn', () => {
let hero = {
name: 'Heracles',
father: 'Zeus',
bornAt: 'Thebes',
Similar blocks of code found in 2 locations. Consider refactoring.
it('includesIn', () => {
let hero = {
name: 'Heracles',
father: 'Zeus',
bornAt: 'Thebes',
Function callUnless
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
let callUnless = (check) => (failFn) => (fn) => (x, y) =>
check(x) ? failFn(y) : check(y) ? failFn(x) : fn(x, y)
Similar blocks of code found in 2 locations. Consider refactoring.
it('dotEncoder', () => {
expect(F.dotEncoder.encode(['a', 'b'])).to.equal('a.b')
expect(F.dotEncoder.decode('a.b')).to.deep.equal(['a', 'b'])
})
Similar blocks of code found in 2 locations. Consider refactoring.
it('slashEncoder', () => {
expect(F.slashEncoder.encode(['a', 'b'])).to.equal('a/b')
expect(F.slashEncoder.decode('a/b')).to.deep.equal(['a', 'b'])
})