All files / Select/functions stringifyValue.spec.js

100% Statements 11/11
100% Branches 0/0
100% Functions 4/4
100% Lines 11/11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 221x   1x   1x 1x 1x     1x 1x     1x     1x 1x 1x      
import React from 'react';
 
import stringifyValue from './stringifyValue';
 
describe('stringifyValue', () => {
  it('should return string when param is number', () => {
    expect(stringifyValue(1)).to.equal('1');
  })
 
  it('should return string when param is object', () => {
    const objValue = {
      "a": "b"
    }
    expect(stringifyValue(objValue)).to.equal('{"a":"b"}');
  })
 
  it('should return string when param is array', () => {
    const arrayValue = ['foo', 'bar'];
    expect(stringifyValue(arrayValue)).to.equal('["foo","bar"]');
  })
});