1 const safeTrim = require('./safe-trim').safeTrim;
3 describe('safeTrim', () => {
4 it('should trim the input if the input is a string', () => {
5 expect(safeTrim(' ABC ')).toEqual('ABC');
8 test.each([null, undefined, 10, {}, true])(
9 `for input of same type as %p, it should return the input without modifications`,
11 expect(safeTrim(input)).toEqual(input);