1import React from 'react';
2
3import { getTextFromChildren } from './withAnchor';
4
5describe(getTextFromChildren, () => {
6  it('returns simple child text', () => {
7    expect(getTextFromChildren('Hello')).toBe('Hello');
8  });
9
10  it('returns text from child element', () => {
11    expect(getTextFromChildren(<span>Hello</span>)).toBe('Hello');
12  });
13
14  it('returns text from miltiple child elements', () => {
15    expect(
16      getTextFromChildren(
17        <>
18          <span>Hello</span>
19          <span>World</span>
20        </>
21      )
22    ).toBe('Hello World');
23  });
24});
25