text: const { expect } = require('chai');
  const { uniqWith } = require('lodash');
  const {
    isNotEmpty,
    noDuplicateFoundWB
  } = require('../utils/utils');
  const { ccdData } = require('../utils/dataProvider');
  
  function assertFieldDefinitionIsValid(row) {
    expect(row.CaseTypeID).to.be.a('string').and.satisfy(v => {
      return v.startsWith('PRLAPPS');
    });
    expect(row.CaseFieldID).to.be.a('string').and.satisfy(isNotEmpty());
    expect(row.Label).to.be.a('string').and.satisfy(isNotEmpty());
  }
  
  describe('SearchResultFields', () => {
    context('should :', () => {
      let uniqResult = [];
      let nonProd = [];
      before(() => {
        nonProd = ccdData.SearchResultFields;
        uniqResult = uniqWith(nonProd, noDuplicateFoundWB);
      });
  
      it('not contain duplicated definitions of the same field', () => {
        expect(uniqResult).to.eql(nonProd);
      });
  
      it('should have only valid definitions', () => {
        uniqResult.forEach(assertFieldDefinitionIsValid);
      });
    });
  });
  