diff --git a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js
index 08a83ace2e..441545fc0a 100644
--- a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js
@@ -567,7 +567,6 @@ describe('ReactDOMComponent', () => {
}
}).toWarnDev(
'Warning: Invalid attribute name: `blah" onclick="beevil" noise="hi`',
- {withoutStack: true}, // TODO: add a stack
);
});
@@ -587,7 +586,6 @@ describe('ReactDOMComponent', () => {
}
}).toWarnDev(
'Warning: Invalid attribute name: `blah" onclick="beevil" noise="hi`',
- {withoutStack: true}, // TODO: add a stack
);
});
@@ -1006,7 +1004,6 @@ describe('ReactDOMComponent', () => {
' is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase for HTML elements.',
- {withoutStack: true}, // TODO: add a stack
);
expect(returnedValue).not.toContain('');
});
@@ -1023,7 +1020,6 @@ describe('ReactDOMComponent', () => {
' is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase for HTML elements.',
- {withoutStack: true}, // TODO: add a stack
);
});
@@ -1033,7 +1029,6 @@ describe('ReactDOMComponent', () => {
).toWarnDev(
'The `aria` attribute is reserved for future use in React. ' +
'Pass individual `aria-` attributes instead.',
- {withoutStack: true}, // TODO: add a stack
);
});
@@ -1056,12 +1051,10 @@ describe('ReactDOMComponent', () => {
expect(() => ReactTestUtils.renderIntoDocument()).toWarnDev(
'The tag is unrecognized in this browser',
- {withoutStack: true}, // TODO: add a stack
);
// Test deduplication
expect(() => ReactTestUtils.renderIntoDocument()).toWarnDev(
'The tag is unrecognized in this browser',
- {withoutStack: true}, // TODO: add a stack
);
ReactTestUtils.renderIntoDocument();
// This is a funny case.
@@ -1073,15 +1066,12 @@ describe('ReactDOMComponent', () => {
// Corner case. Make sure out deduplication logic doesn't break with weird tag.
expect(() =>
ReactTestUtils.renderIntoDocument(),
- ).toWarnDev(
- [
- ' is using incorrect casing. ' +
- 'Use PascalCase for React components, ' +
- 'or lowercase for HTML elements.',
- 'The tag is unrecognized in this browser',
- ],
- {withoutStack: true}, // TODO: add a stack
- );
+ ).toWarnDev([
+ ' is using incorrect casing. ' +
+ 'Use PascalCase for React components, ' +
+ 'or lowercase for HTML elements.',
+ 'The tag is unrecognized in this browser',
+ ]);
} finally {
Object.prototype.toString = realToString; // eslint-disable-line no-extend-native
}
@@ -1140,7 +1130,6 @@ describe('ReactDOMComponent', () => {
expect(() => ReactDOM.render(, node)).toWarnDev(
'ShadyComponent is using shady DOM. Using shady DOM with React can ' +
'cause things to break subtly.',
- {withoutStack: true}, // TODO: add a stack
);
mountComponent({is: 'custom-shady-div2'});
} finally {
@@ -1161,7 +1150,6 @@ describe('ReactDOMComponent', () => {
expect(() => mountComponent({is: 'custom-shady-div'})).toWarnDev(
'A component is using shady DOM. Using shady DOM with React can ' +
'cause things to break subtly.',
- {withoutStack: true}, // TODO: add a stack
);
// No additional warnings are expected
@@ -1209,17 +1197,13 @@ describe('ReactDOMComponent', () => {
it('should validate against use of innerHTML', () => {
expect(() =>
mountComponent({innerHTML: 'Hi Jim!'}),
- ).toWarnDev('Directly setting property `innerHTML` is not permitted. ', {
- withoutStack: true, // TODO: add a stack
- });
+ ).toWarnDev('Directly setting property `innerHTML` is not permitted. ');
});
it('should validate against use of innerHTML without case sensitivity', () => {
expect(() =>
mountComponent({innerhtml: 'Hi Jim!'}),
- ).toWarnDev('Directly setting property `innerHTML` is not permitted. ', {
- withoutStack: true, // TODO: add a stack
- });
+ ).toWarnDev('Directly setting property `innerHTML` is not permitted. ');
});
it('should validate use of dangerouslySetInnerHTML', () => {
@@ -1812,13 +1796,11 @@ describe('ReactDOMComponent', () => {
ReactTestUtils.renderIntoDocument(
{}} />),
).toWarnDev(
'React uses onFocus and onBlur instead of onFocusIn and onFocusOut.',
- {withoutStack: true}, // TODO: add a stack
);
expect(() =>
ReactTestUtils.renderIntoDocument(
{}} />),
).toWarnDev(
'React uses onFocus and onBlur instead of onFocusIn and onFocusOut.',
- {withoutStack: true}, // TODO: add a stack
);
});
@@ -1828,13 +1810,11 @@ describe('ReactDOMComponent', () => {
ReactTestUtils.renderIntoDocument(
{}} />),
).toWarnDev(
'React uses onFocus and onBlur instead of onFocusIn and onFocusOut.',
- {withoutStack: true}, // TODO: add a stack
);
expect(() =>
ReactTestUtils.renderIntoDocument(
{}} />),
).toWarnDev(
'React uses onFocus and onBlur instead of onFocusIn and onFocusOut.',
- {withoutStack: true}, // TODO: add a stack
);
});
@@ -1844,13 +1824,11 @@ describe('ReactDOMComponent', () => {
ReactDOMServer.renderToString(
{}} />),
).toWarnDev(
'React uses onFocus and onBlur instead of onFocusIn and onFocusOut.',
- {withoutStack: true}, // TODO: add a stack
);
expect(() =>
ReactDOMServer.renderToString(
{}} />),
).toWarnDev(
'React uses onFocus and onBlur instead of onFocusIn and onFocusOut.',
- {withoutStack: true}, // TODO: add a stack
);
});
@@ -1860,13 +1838,11 @@ describe('ReactDOMComponent', () => {
ReactDOMServer.renderToString(
{}} />),
).toWarnDev(
'React uses onFocus and onBlur instead of onFocusIn and onFocusOut.',
- {withoutStack: true}, // TODO: add a stack
);
expect(() =>
ReactDOMServer.renderToString(
{}} />),
).toWarnDev(
'React uses onFocus and onBlur instead of onFocusIn and onFocusOut.',
- {withoutStack: true}, // TODO: add a stack
);
});
diff --git a/packages/react-dom/src/__tests__/ReactDOMInput-test.js b/packages/react-dom/src/__tests__/ReactDOMInput-test.js
index aaa2083934..480287cfc0 100644
--- a/packages/react-dom/src/__tests__/ReactDOMInput-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMInput-test.js
@@ -930,7 +930,6 @@ describe('ReactDOMInput', () => {
'both). Decide between using a controlled or uncontrolled input ' +
'element and remove one of these props. More info: ' +
'https://fb.me/react-controlled-components',
- {withoutStack: true}, // TODO: add a stack
);
ReactDOM.unmountComponentAtNode(container);
@@ -958,7 +957,6 @@ describe('ReactDOMInput', () => {
'both). Decide between using a controlled or uncontrolled input ' +
'element and remove one of these props. More info: ' +
'https://fb.me/react-controlled-components',
- {withoutStack: true}, // TODO: add a stack
);
ReactDOM.unmountComponentAtNode(container);
diff --git a/packages/react-dom/src/__tests__/ReactDOMSelect-test.js b/packages/react-dom/src/__tests__/ReactDOMSelect-test.js
index 8ed6f32d0f..5548c03931 100644
--- a/packages/react-dom/src/__tests__/ReactDOMSelect-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMSelect-test.js
@@ -566,25 +566,21 @@ describe('ReactDOMSelect', () => {
});
it('should warn if selected is set on
,
),
- ).toWarnDev(
- [
- 'Warning: is using incorrect casing. ' +
- 'Use PascalCase for React components, ' +
- 'or lowercase for HTML elements.',
- // linearGradient doesn't warn
- 'Warning: is using incorrect casing. ' +
- 'Use PascalCase for React components, ' +
- 'or lowercase for HTML elements.',
- ],
- {withoutStack: true},
- );
+ ).toWarnDev([
+ 'Warning: is using incorrect casing. ' +
+ 'Use PascalCase for React components, ' +
+ 'or lowercase for HTML elements.',
+ // linearGradient doesn't warn
+ 'Warning: is using incorrect casing. ' +
+ 'Use PascalCase for React components, ' +
+ 'or lowercase for HTML elements.',
+ ]);
});
it('should warn about contentEditable and children', () => {
diff --git a/packages/react-dom/src/client/ReactDOMFiberComponent.js b/packages/react-dom/src/client/ReactDOMFiberComponent.js
index d44e243e5d..bad296429e 100644
--- a/packages/react-dom/src/client/ReactDOMFiberComponent.js
+++ b/packages/react-dom/src/client/ReactDOMFiberComponent.js
@@ -353,7 +353,7 @@ export function createElement(
isCustomComponentTag = isCustomComponent(type, props);
// Should this check be gated by parent namespace? Not sure we want to
// allow