You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got TypeError: analytics_next_1.AnalyticsBrowser is not a constructor when running in Jest
● Test suite failed to run
TypeError: analytics_next_1.AnalyticsBrowser is not a constructor
1 | import { AnalyticsBrowser } from "@segment/analytics-next";
2 |
> 3 | export default new AnalyticsBrowser();
Code:
import { AnalyticsBrowser } from "@segment/analytics-next";
export default new AnalyticsBrowser();
Used const instance = AnalyticsBrowser.load is running well
The text was updated successfully, but these errors were encountered:
Got
TypeError: analytics_next_1.AnalyticsBrowser is not a constructor
when running in JestCode:
Used
const instance = AnalyticsBrowser.load
is running wellThe text was updated successfully, but these errors were encountered: