Skip to content

Commit d11c546

Browse files
author
Brian Vaughn
committed
Replaced another console.error() call with fbjs warning()
1 parent 4f5aa2e commit d11c546

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

addons/react-addons-test-utils/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99

1010
'use strict';
1111

12+
var warning = require('fbjs/lib/warning');
13+
1214
// This package has been deprecated in NPM as of version 15.5.0
1315
// But NPM deprecation warnings are easy to overlook
1416
// So a more explicit runtime warning seemed appropriate
15-
console.error(
17+
warning(
18+
false,
1619
'ReactTestUtils has been moved to react-dom/test-utils. ' +
1720
'Update references to remove this warning.'
1821
);

addons/react-addons-test-utils/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('ReactTestUtils', function() {
2424

2525
it('should warn on include', function() {
2626
expect(console.error).toHaveBeenCalledWith(
27-
'ReactTestUtils has been moved to react-dom/test-utils. ' +
27+
'Warning: ReactTestUtils has been moved to react-dom/test-utils. ' +
2828
'Update references to remove this warning.'
2929
);
3030
});

0 commit comments

Comments
 (0)