Skip to content

Commit cde4efc

Browse files
committed
[test] noForwardRef -> forwardRef
our components should forward by default
1 parent b9d89bb commit cde4efc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/material-ui/src/Typography/Typography.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('<Typography />', () => {
2222
classes,
2323
inheritComponentName: 'p',
2424
mount,
25-
noForwardRef: true,
25+
forwardRef: true,
2626
});
2727
});
2828

packages/material-ui/src/test-utils/describeConformance.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ function testPropsSpread(element, options) {
8383
*
8484
* @param {React.ReactElement} element
8585
* @param {Object} options
86-
* @param {boolean} options.noForwardRef - If `true` then this component can't forward its refs
86+
* @param {boolean} options.forwardRef - If `true` then this component forwards `ref`
8787
*/
8888
function testRefForwarding(element, options) {
89-
const { noForwardRef, mount } = options;
89+
const { forwardRef, mount } = options;
9090

9191
describe('prop: innerRef', () => {
9292
before(() => {
@@ -98,11 +98,11 @@ function testRefForwarding(element, options) {
9898
consoleErrorMock.reset();
9999
});
100100

101-
it(`does ${noForwardRef ? 'not' : ''} forward ref`, () => {
101+
it(`does ${!forwardRef ? 'not' : ''} forward ref`, () => {
102102
const ref = React.createRef();
103103
mount(React.cloneElement(element, { innerRef: ref }));
104104

105-
if (noForwardRef) {
105+
if (!forwardRef) {
106106
assert.strictEqual(ref.current, null);
107107
} else {
108108
assert.ok(ref.current);

0 commit comments

Comments
 (0)