@testing-library/react
Advanced tools
Comparing version 9.3.1 to 9.3.2
@@ -39,11 +39,13 @@ 'use strict'; | ||
enqueueTask = function (callback) { | ||
if (didWarnAboutMessageChannel === false) { | ||
var supportsMessageChannel = typeof MessageChannel === 'function'; | ||
if (supportsMessageChannel) { | ||
var channel = new MessageChannel(); | ||
channel.port1.onmessage = callback; | ||
channel.port2.postMessage(undefined); | ||
} else if (didWarnAboutMessageChannel === false) { | ||
didWarnAboutMessageChannel = true; // eslint-disable-next-line no-console | ||
console.error(typeof MessageChannel !== 'undefined', 'This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.'); | ||
console.error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.'); | ||
} | ||
var channel = new MessageChannel(); | ||
channel.port1.onmessage = callback; | ||
channel.port2.postMessage(undefined); | ||
}; | ||
@@ -50,0 +52,0 @@ } |
@@ -34,11 +34,13 @@ import _regeneratorRuntime from '@babel/runtime/regenerator'; | ||
enqueueTask = function (callback) { | ||
if (didWarnAboutMessageChannel === false) { | ||
var supportsMessageChannel = typeof MessageChannel === 'function'; | ||
if (supportsMessageChannel) { | ||
var channel = new MessageChannel(); | ||
channel.port1.onmessage = callback; | ||
channel.port2.postMessage(undefined); | ||
} else if (didWarnAboutMessageChannel === false) { | ||
didWarnAboutMessageChannel = true; // eslint-disable-next-line no-console | ||
console.error(typeof MessageChannel !== 'undefined', 'This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.'); | ||
console.error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.'); | ||
} | ||
var channel = new MessageChannel(); | ||
channel.port1.onmessage = callback; | ||
channel.port2.postMessage(undefined); | ||
}; | ||
@@ -45,0 +47,0 @@ } |
@@ -32,11 +32,13 @@ "use strict"; | ||
enqueueTask = callback => { | ||
if (didWarnAboutMessageChannel === false) { | ||
const supportsMessageChannel = typeof MessageChannel === 'function'; | ||
if (supportsMessageChannel) { | ||
const channel = new MessageChannel(); | ||
channel.port1.onmessage = callback; | ||
channel.port2.postMessage(undefined); | ||
} else if (didWarnAboutMessageChannel === false) { | ||
didWarnAboutMessageChannel = true; // eslint-disable-next-line no-console | ||
console.error(typeof MessageChannel !== 'undefined', 'This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.'); | ||
console.error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.'); | ||
} | ||
const channel = new MessageChannel(); | ||
channel.port1.onmessage = callback; | ||
channel.port2.postMessage(undefined); | ||
}; | ||
@@ -43,0 +45,0 @@ } |
{ | ||
"name": "@testing-library/react", | ||
"version": "9.3.1", | ||
"version": "9.3.2", | ||
"description": "Simple and complete React DOM testing utilities that encourage good testing practices.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3347497
22544