File augment-hierarchy.spec.js
has 388 lines of code (exceeds 250 allowed). Consider refactoring.
import q from '../dataset';
import { getPropsInfo } from '../../../../../packages/picasso.js/src/core/data/util';
describe('augment-hierarchy', () => {
beforeAll(() => {
Identical blocks of code found in 2 locations. Consider refactoring.
cube.qDataPages = [
{
qMatrix: [
[
{ qText: 'A', qElemNumber: 1 },
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 332..352 Identical blocks of code found in 2 locations. Consider refactoring.
cube.qDataPages = [
{
qMatrix: [
[
{ qText: 'A', qElemNumber: 1 },
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 372..392 Similar blocks of code found in 2 locations. Consider refactoring.
const m = q({ key: 'nyckel', data: cube }).hierarchy({
props: {
dimOne: {
field: 'qDimensionInfo/0',
value: (d) => d.qText,
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 190..198 Similar blocks of code found in 2 locations. Consider refactoring.
const m = q({ key: 'nyckel', data: cube }).hierarchy({
props: {
desc: {
field: 'qDimensionInfo/1',
value: (d) => d.qText,
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 162..170 Similar blocks of code found in 2 locations. Consider refactoring.
{
qText: 'a1',
qElemNo: 0,
qRow: 8,
qValue: 123,
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 102..116 Similar blocks of code found in 2 locations. Consider refactoring.
{
qText: 'b3',
qElemNo: 9,
qRow: 13,
qValue: 276,
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 42..56 Similar blocks of code found in 3 locations. Consider refactoring.
const h = d.hierarchy({
value: (v) => (v ? v.qText : '__'),
props: {
v: {
field: 'qMeasureInfo/0',
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 317..325 plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 397..405 Similar blocks of code found in 3 locations. Consider refactoring.
const h = d.hierarchy({
value: (v) => (v ? v.qText : '__'),
props: {
v: {
field: 'qMeasureInfo/0',
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 357..365 plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 397..405 Similar blocks of code found in 3 locations. Consider refactoring.
const h = d.hierarchy({
value: (v) => (v ? v.qText : '__'),
props: {
v: {
field: 'qMeasureInfo/0',
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 317..325 plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 357..365 Identical blocks of code found in 3 locations. Consider refactoring.
expect(h.descendants().map((child) => child.data.v.value)).to.eql([6, 4, 10, 3, 5, 10]);
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 367..367 plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 407..407 Identical blocks of code found in 3 locations. Consider refactoring.
expect(h.descendants().map((child) => child.data.v.value)).to.eql([6, 4, 10, 3, 5, 10]);
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 327..327 plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 367..367 Identical blocks of code found in 3 locations. Consider refactoring.
expect(h.descendants().map((child) => child.data.v.value)).to.eql([6, 4, 10, 3, 5, 10]);
plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 327..327 plugins/q/src/data/__tests__/augment-hierarchy.spec.js on lines 407..407 There are no issues that match your filters.