import React, { PropsWithChildren } from 'react' import { getText } from '.' describe('getText', () => { it('should return the text', () => { expect(getText('foo')).toBe('foo') }) it('should return the text with number input', () => { expect(getText(1)).toBe('1') }) it('should extract text from array input', () => { expect(getText([1, 2, 3])).toBe('123') }) it('should extract text from null input', () => { expect(getText(null)).toBe('') }) it('should extract text from undefined input', () => { expect(getText(undefined)).toBe('') }) it('should extract text from jsx input', () => { expect(getText(
bar baz
foo{bar}
)).toBe('foobar') }) })