From 5e220412fda5a781bbbd63f341d40502869dccdd Mon Sep 17 00:00:00 2001 From: Ilya Gruzhevski Date: Thu, 26 Apr 2018 17:07:15 +0200 Subject: [PATCH] add console global to the whitelisted identifiers --- CHANGELOG.md | 2 ++ packages/babel-plugin-jest-hoist/src/index.js | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2b54d8f4387..8b46bacd725b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,8 @@ ### Fixes +* `[babel-plugin-jest-hoist]` Allow using `console` global variable + ([#6074](https://github.com/facebook/jest/pull/6074)) * `[jest-jasmine2]` Always remove node core message from assert stack traces ([#6055](https://github.com/facebook/jest/pull/6055)) * `[expect]` Add stack trace when `expect.assertions` and `expect.hasAssertions` diff --git a/packages/babel-plugin-jest-hoist/src/index.js b/packages/babel-plugin-jest-hoist/src/index.js index f6efc313b92d..5ace55013709 100644 --- a/packages/babel-plugin-jest-hoist/src/index.js +++ b/packages/babel-plugin-jest-hoist/src/index.js @@ -60,6 +60,7 @@ const WHITELISTED_IDENTIFIERS = { WeakMap: true, WeakSet: true, arguments: true, + console: true, expect: true, isNaN: true, jest: true,