<commit_before>/**
 * Copyright 2013-present, 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', () => {
  var oldProcess;

  var ReactDOMFeatureFlags = require('ReactDOMFeatureFlags');

  var React;
  var ReactDOM;

  beforeEach(() => {
    __DEV__ = false;
    oldProcess = process;
    global.process = {
      env: Object.assign({}, process.env, {NODE_ENV: 'production'}),
    };

    jest.resetModules();
    React = require('React');
    ReactDOM = require('ReactDOM');
  });

  afterEach(() => {
    __DEV__ = true;
    global.process = oldProcess;
  });

  it('should use prod fbjs', () => {
    var warning = require('warning');

    spyOn(console, 'error');
    warning(false, 'Do cows go moo?');
    expectDev(console.error.calls.count()).toBe(0);
  });

  it('should use prod React', () => {
    spyOn(console, 'error');
<commit_msg>Add process.cwd to the test process shim<commit_after>/**
 * Copyright 2013-present, 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', () => {
  var oldProcess;

  var ReactDOMFeatureFlags = require('ReactDOMFeatureFlags');

  var React;
  var ReactDOM;

  beforeEach(() => {
    __DEV__ = false;
    oldProcess = process;
    global.process = {
      cwd: process.cwd,
      env: Object.assign({}, process.env, {NODE_ENV: 'production'}),
    };

    jest.resetModules();
    React = require('React');
    ReactDOM = require('ReactDOM');
  });

  afterEach(() => {
    __DEV__ = true;
    global.process = oldProcess;
  });

  it('should use prod fbjs', () => {
    var warning = require('warning');

    spyOn(console, 'error');
    warning(false, 'Do cows go moo?');
    expectDev(console.error.calls.count()).toBe(0);
  });

  it('should use prod React', () => {
    spyOn(console, 'error');

{'fraction_non_alphanumeric': 0.14512666380420783, 'fraction_numerical': 0.004293688278231, 'mean_word_length': 3.3551401869158877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2271347', 'n_tokens_mistral': 729, 'n_tokens_neox': 712, 'n_words': 214}