-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Package + Version
@sentry/browser: 4.1.1- ember-cli: 3.4.5
Description
When the Sentry.Ember integration is added to a fresh project the tests will fail with:
ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly
✘ Ember.onerror handler with invalid testing behavior detected. An Ember.onerror handler _must_ r
ethrow exceptions when `Ember.testing` is `true` or the test suite is unreliable. See https://git.io/
vbine for more details.
I followed https://docs.sentry.io/platforms/javascript/ember/ and did
// app/app.js
import * as Sentry from '@sentry/browser'
if (!ENV.environment === 'test') {
Sentry.init({
dsn: 'abc123',
integrations: [new Sentry.Integrations.Ember()]
})
}To fix it, I added a conditional to not load sentry while testing.
import ENV from 'my-app/config/environment'
if (!ENV.environment === 'test') {
Sentry.init({
dsn: 'abc123',
integrations: [new Sentry.Integrations.Ember()]
})
}`Should this be handled in the integration or just update the docs?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels