mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge pull request #1520 from syranide/ediblechildren
Warn against contentEditable with children props
This commit is contained in:
commit
c14b3a1b13
2 files changed
+27
No files matched your search
@@ -346,6 +346,13 @@ describe('ReactDOMComponent', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it("should warn about contentEditable and children", function() {
|
||||
spyOn(console, 'warn');
|
||||
mountComponent({ contentEditable: true, children: '' });
|
||||
expect(console.warn.argsForCall.length).toBe(1);
|
||||
expect(console.warn.argsForCall[0][0]).toContain('contentEditable');
|
||||
});
|
||||
|
||||
it("should validate against invalid styles", function() {
|
||||
expect(function() {
|
||||
mountComponent({ style: 'display: none' });
|
||||
@@ -379,6 +386,16 @@ describe('ReactDOMComponent', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it("should warn about contentEditable and children", function() {
|
||||
spyOn(console, 'warn');
|
||||
React.renderComponent(
|
||||
<div contentEditable><div /></div>,
|
||||
container
|
||||
);
|
||||
expect(console.warn.argsForCall.length).toBe(1);
|
||||
expect(console.warn.argsForCall[0][0]).toContain('contentEditable');
|
||||
});
|
||||
|
||||
it("should validate against invalid styles", function() {
|
||||
React.renderComponent(<div></div>, container);
|
||||
|
||||
|
||||
Reference in new issue
Block a user