diff --git a/src/renderers/dom/__tests__/ReactDOMProduction-test.js b/src/renderers/dom/__tests__/ReactDOMProduction-test.js new file mode 100644 index 0000000000..997958caf8 --- /dev/null +++ b/src/renderers/dom/__tests__/ReactDOMProduction-test.js @@ -0,0 +1,90 @@ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @emails react-core + */ + +'use strict'; + +describe('ReactDOMProduction', function() { + var oldProcess; + + var React; + var ReactDOM; + + beforeEach(function() { + __DEV__ = true; + oldProcess = process; + global.process = {env: {NODE_ENV: 'production'}}; + + require('mock-modules').dumpCache(); + React = require('React'); + ReactDOM = require('ReactDOM'); + }); + + afterEach(function() { + __DEV__ = false; + global.process = oldProcess; + }); + + it('should use prod fbjs', function() { + var warning = require('warning'); + + spyOn(console, 'error'); + warning(false, 'Do cows go moo?'); + expect(console.error.argsForCall.length).toBe(0); + }); + + it('should use prod React', function() { + spyOn(console, 'error'); + + // no key warning + void