submitAnalytics causing ReferenceError: trying to import
a file after the Jest environment has been torn down
#3608
Labels
import
a file after the Jest environment has been torn down
#3608
While running jest unit tests on both v10.2.0 and v6.1.6 I am getting the error:
ReferenceError: You are trying to import a file after the Jest environment has been torn down
I have looked through the version diffs for these releases and what is causing the error and have narrowed it down the the new analytics changes. Specifically, in lib/submit-analytics.js
Removing the 100ms timeout promise delay solves the issue. I'm wondering what was the reason for adding this?
Goals
Run jest unit tests with realm.
Expected Results
Jest unit tests to run as normally on v10.1.4 and below and v6.1.5 and below.
Actual Results
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: