After a discussion with @spicyj we decided to keep the warning even though the functions will throw in production. The warning is the only way to learn about that.

We should also document how to pass the secret through in case you know what you're doing.

var specifiedButIsNullMsg = 'The prop `testProp` is marked as required in ' +
    '`testComponent`, but its value is `null`.';
  var unspecifiedMsg = 'The prop `testProp` is marked as required in ' +
    '`testComponent`, but its value is \`undefined\`.';
  var props1 = {testProp: null};
  var error1 = declaration(
    props1,
    'testProp',
    'testComponent',
    'prop',
  );
  expect(error1 instanceof Error).toBe(true);
  expect(error1.message).toBe(specifiedButIsNullMsg);
  var props2 = {testProp: undefined};
  var error2 = declaration(
    props2,
    'testProp',
    'testComponent',
    'prop',
  );
  expect(error2 instanceof Error).toBe(true);
  expect(error2.message).toBe(unspecifiedMsg);
  var props3 = {};
  var error3 = declaration(
    props3,
    'testProp',
    'testComponent',
    'prop',
  );
  expect(error3 instanceof Error).toBe(true);