File extractor-t.spec.js
has 1168 lines of code (exceeds 250 allowed). Consider refactoring.
import { extract, getFieldDepth } from '../extractor-t';
import { getPropsInfo, collect, track } from '../../../../../packages/picasso.js/src/core/data/util';
describe('q-data-extractor-t', () => {
Similar blocks of code found in 3 locations. Consider refactoring.
expect(m).to.eql([
{
value: 0,
label: 'Beer',
source: { key: 'cube', field: 'qDimensionInfo/1' },
Similar blocks of code found in 3 locations. Consider refactoring.
expect(m).to.eql([
{
value: 0,
label: 'Beer',
source: { key: 'cube', field: 'qDimensionInfo/1' },
Similar blocks of code found in 3 locations. Consider refactoring.
expect(m).to.eql([
{
value: 0,
label: 'Beer',
source: { key: 'cube', field: 'qDimensionInfo/1' },
Similar blocks of code found in 2 locations. Consider refactoring.
{
qText: 'Beta',
qElemNo: 3,
qRow: 10,
qType: 'N',
Similar blocks of code found in 2 locations. Consider refactoring.
{
qText: 'Alpha',
qElemNo: 1,
qRow: 7,
qType: 'N',
Similar blocks of code found in 3 locations. Consider refactoring.
expect(m).to.eql([
{
value: 0.25,
label: '25%',
source: { key: 'cube', field: 'qMeasureInfo/1' },
Similar blocks of code found in 3 locations. Consider refactoring.
expect(m).to.eql([
{
value: 0,
label: 'Alcoholic Beverages',
source: { key: 'cube', field: 'qDimensionInfo/0' },
Similar blocks of code found in 3 locations. Consider refactoring.
expect(m).to.eql([
{
value: 0,
label: 'Alcoholic Beverages',
source: { key: 'cube', field: 'qDimensionInfo/0' },
Similar blocks of code found in 2 locations. Consider refactoring.
it('should return attr dim field values based on default field accessor', () => {
const m = extract(
{
field: 'firstDimSecondAttrDim',
},
Similar blocks of code found in 2 locations. Consider refactoring.
it('should return dim field values based on default field accessor', () => {
const m = extract(
{
field: 'qDimensionInfo/0',
},
Similar blocks of code found in 3 locations. Consider refactoring.
{
qFallbackTitle: 'Amount Overdue',
qApprMaxGlyphCount: 11,
qCardinal: 0,
qSortIndicator: 'D',
Similar blocks of code found in 5 locations. Consider refactoring.
{
qText: 'Wine',
qElemNo: 1,
qNodeNr: 5,
qParentNode: 1,
plugins/q/src/data/__tests__/extractor-t.spec.js on lines 32..51 plugins/q/src/data/__tests__/extractor-t.spec.js on lines 84..103 Similar blocks of code found in 5 locations. Consider refactoring.
{
qText: 'Bagels',
qElemNo: 2,
qNodeNr: 6,
qParentNode: 2,
plugins/q/src/data/__tests__/extractor-t.spec.js on lines 32..51 plugins/q/src/data/__tests__/extractor-t.spec.js on lines 52..71 Similar blocks of code found in 5 locations. Consider refactoring.
{
qText: 'Beer',
qElemNo: 0,
qNodeNr: 4,
qParentNode: 1,
plugins/q/src/data/__tests__/extractor-t.spec.js on lines 52..71 plugins/q/src/data/__tests__/extractor-t.spec.js on lines 84..103 Similar blocks of code found in 5 locations. Consider refactoring.
{
qText: 'Muffins',
qElemNo: 3,
qNodeNr: 7,
qParentNode: 2,
plugins/q/src/data/__tests__/extractor-t.spec.js on lines 32..51 plugins/q/src/data/__tests__/extractor-t.spec.js on lines 52..71 plugins/q/src/data/__tests__/extractor-t.spec.js on lines 84..103 Similar blocks of code found in 5 locations. Consider refactoring.
{
qText: 'Sliced Bread',
qElemNo: 4,
qNodeNr: 8,
qParentNode: 2,
plugins/q/src/data/__tests__/extractor-t.spec.js on lines 32..51 plugins/q/src/data/__tests__/extractor-t.spec.js on lines 52..71 plugins/q/src/data/__tests__/extractor-t.spec.js on lines 84..103 Similar blocks of code found in 3 locations. Consider refactoring.
{
title: () => 'a',
value: (d) => d.qElemNo,
label: (d) => d.qText,
key: () => 'qDimensionInfo/0',
Similar blocks of code found in 3 locations. Consider refactoring.
{
title: () => 'am',
value: (d) => d.qElemNo,
label: (d) => d.qText,
key: () => 'qDimensionInfo/0/qMeasureInfo/1',
Similar blocks of code found in 3 locations. Consider refactoring.
{
title: () => 'd',
value: (d) => d.qValue,
label: (d) => d.qText,
key: () => 'qDimensionInfo/1/qMeasureInfo/1',
Similar blocks of code found in 2 locations. Consider refactoring.
{
title: () => 'c',
value: (d) => d.qValue,
label: (d) => d.qText,
key: () => 'qMeasureInfo/0',
Similar blocks of code found in 2 locations. Consider refactoring.
{
title: () => 'd',
value: (d) => d.qValue,
label: (d) => d.qText,
key: () => 'qMeasureInfo/1',
Similar blocks of code found in 2 locations. Consider refactoring.
const m = extract(
{
field: 'qDimensionInfo/1/qAttrExprInfo/0',
value: (d) => d?.qNum || NaN,
label: (d) => d?.qText || '',
Similar blocks of code found in 2 locations. Consider refactoring.
const m = extract(
{
field: 'firstDimSecondAttrDim',
value: (d) => d?.qElemNo || NaN,
label: (d) => d?.qText || '',
Similar blocks of code found in 3 locations. Consider refactoring.
qStateCounts: {
qLocked: 0,
qSelected: 0,
qOption: 5,
qDeselected: 0,
Similar blocks of code found in 3 locations. Consider refactoring.
qStateCounts: {
qLocked: 0,
qSelected: 2,
qOption: 0,
qDeselected: 0,
There are no issues that match your filters.