import removeInvalidChars from '../removeInvalidChars'; test('should by default removed all characters', () => { const removeInvalidChars1 = removeInvalidChars('ewkufhewfiewf'); expect(removeInvalidChars1).toEqual(''); }); test('should allow selected characters', () => { const removeInvalidChars1 = removeInvalidChars('1000.11', ['.']); expect(removeInvalidChars1).toEqual('1000.11'); const removeInvalidChars2 = removeInvalidChars('jkadshfadjksfh.11', ['.']); expect(removeInvalidChars2).toEqual('.11'); });