import { getUrlFromCriterias, storeToArray, verifyVariable } from './utils';

describe('Utils', () => {
  test('getUrlFromCriterias', () => {
    expect(getUrlFromCriterias()).toBe('');
    expect(getUrlFromCriterias({})).toBe('');
    expect(getUrlFromCriterias({ key1: 'value-key1' })).toBe(
      '?key1=value-key1',
    );
    expect(getUrlFromCriterias({ key1: undefined })).toBe('');
    expect(
      getUrlFromCriterias({ key1: 'value-key1', key2: 'value-key2' }),
    ).toBe('?key1=value-key1&key2=value-key2');
    expect(getUrlFromCriterias({ key1: 'value-key1', key2: undefined })).toBe(
      '?key1=value-key1',
    );
  });
  test('storeToArray', () => {
    expect(storeToArray()).toEqual([]);
  });

  test('verifyVariable', () => {
    const label = 'Value0: $Value1 $Value2 $Value3$ Value4';
    expect(verifyVariable(label)).toBe('Value0: $Value1$ $Value2$ $Value3$ Value4');
  });

});

@@ -709,17 +709,16 @@
 ;%0A  %7D);%0A
-%0A
   test('
@@ -894,13 +894,12 @@
 ;%0A  %7D);%0A
-%0A
 %7D);%0A

Remove whitespace