Welcome to mirror list, hosted at ThFree Co, Russian Federation.

filtered_search_utils_spec.js « filtered_search_bar « components « vue_shared « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a857f84adf19f1578419f107fba9c5066fd62c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import * as filteredSearchUtils from '~/vue_shared/components/filtered_search_bar/filtered_search_utils';

describe('Filtered Search Utils', () => {
  describe('stripQuotes', () => {
    it.each`
      inputValue     | outputValue
      ${'"Foo Bar"'} | ${'Foo Bar'}
      ${"'Foo Bar'"} | ${'Foo Bar'}
      ${'FooBar'}    | ${'FooBar'}
      ${"Foo'Bar"}   | ${"Foo'Bar"}
      ${'Foo"Bar'}   | ${'Foo"Bar'}
    `(
      'returns string $outputValue when called with string $inputValue',
      ({ inputValue, outputValue }) => {
        expect(filteredSearchUtils.stripQuotes(inputValue)).toBe(outputValue);
      },
    );
  });
});