Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: umi test don't work if have console.log #2015

Merged
merged 1 commit into from
Feb 22, 2019
Merged

Conversation

sorrycc
Copy link
Member

@sorrycc sorrycc commented Feb 22, 2019

Related: jestjs/jest#7857

@sorrycc sorrycc merged commit e5abb42 into master Feb 22, 2019
@sorrycc sorrycc deleted the fix/umi-test-cwd branch February 22, 2019 07:38
@sorrycc sorrycc added pr(bug) and removed type(bug) labels Feb 22, 2019
@realeve
Copy link

realeve commented Feb 22, 2019

最近一次更新之后出来的问题,后面在 jest.setup.js 增加了这样的mock临时解决:

if (!console || console.log) {
  console.log = jest.fn(input => {
    process.stdout.write(`${input} \n`);
  });
  console.warn = console.log;
  console.error = console.log;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants