We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa60afe commit 309e507Copy full SHA for 309e507
src/__tests__/get-node-text.js
@@ -0,0 +1,17 @@
1
+import {getNodeText} from '../get-node-text'
2
+import {render} from './helpers/test-utils'
3
+
4
+test('it prints out the text content of a container', () => {
5
+ const {container} = render('Hello <!--skipped-->World!')
6
+ expect(getNodeText(container)).toMatchInlineSnapshot(`"Hello World!"`)
7
+})
8
9
+test('it prints the value for submit and button inputs', () => {
10
+ const {container} = render(
11
+ '<input type="submit" value="save"><input type="button" value="reset">',
12
+ )
13
14
+ expect(getNodeText(container.firstChild)).toMatchInlineSnapshot(`"save"`)
15
16
+ expect(getNodeText(container.lastChild)).toMatchInlineSnapshot(`"reset"`)
17
0 commit comments