Merge pull request #2633 from facebook/remove_console_logs
[cli] fix spurious console.log output generated by yeoman during tests
This commit is contained in:
commit
2a6a841ba9
|
@ -5,10 +5,21 @@ jest.autoMockOff();
|
|||
var path = require('path');
|
||||
|
||||
describe('react:ios', function() {
|
||||
var assert = require('yeoman-generator').assert;
|
||||
var assert;
|
||||
|
||||
beforeEach(function() {
|
||||
// A deep dependency of yeoman spams console.log with giant json objects.
|
||||
// yeoman-generator/node_modules/
|
||||
// download/node_modules/
|
||||
// caw/node_modules/
|
||||
// get-proxy/node_modules/
|
||||
// rc/index.js
|
||||
var log = console.log;
|
||||
console.log = function() {};
|
||||
assert = require('yeoman-generator').assert;
|
||||
var helpers = require('yeoman-generator').test;
|
||||
console.log = log;
|
||||
|
||||
var generated = false;
|
||||
|
||||
runs(function() {
|
||||
|
|
|
@ -6,10 +6,21 @@ var path = require('path');
|
|||
var fs = require('fs');
|
||||
|
||||
describe('react:react', function() {
|
||||
var assert = require('yeoman-generator').assert;
|
||||
var assert;
|
||||
|
||||
beforeEach(function() {
|
||||
// A deep dependency of yeoman spams console.log with giant json objects.
|
||||
// yeoman-generator/node_modules/
|
||||
// download/node_modules/
|
||||
// caw/node_modules/
|
||||
// get-proxy/node_modules/
|
||||
// rc/index.js
|
||||
var log = console.log;
|
||||
console.log = function() {};
|
||||
assert = require('yeoman-generator').assert;
|
||||
var helpers = require('yeoman-generator').test;
|
||||
console.log = log;
|
||||
|
||||
var generated = false;
|
||||
|
||||
runs(function() {
|
||||
|
@ -46,4 +57,4 @@ describe('react:react', function() {
|
|||
|
||||
expect(stat.isDirectory()).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue