We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e395fa3 commit 0366403Copy full SHA for 0366403
test/index.test.tsx
@@ -69,3 +69,17 @@ it('CodeMirror className', async () => {
69
expect(tree.props.className).toEqual('cm-theme-light test');
70
}
71
});
72
+
73
+it('CodeMirror placeholder', async () => {
74
+ const { findByText } = render(<CodeMirror placeholder="Hello World" className="test" />);
75
+ const text = await findByText('Hello World');
76
+ expect(text.className).toEqual('cm-placeholder');
77
+ expect(text.contentEditable).toEqual('false');
78
+});
79
80
+it('CodeMirror editable', async () => {
81
+ const { getByRole } = render(<CodeMirror editable={false} className="test" />);
82
+ const text = getByRole('textbox');
83
+ expect(text.className).toEqual('cm-content');
84
+ expect(text.tagName).toEqual('DIV');
85
0 commit comments