adopted-ember-addons / adopted-ember-addons/ember-cli-bugsnag

Cannot `import Bugsnag from 'bugsnag'` in test environment

Aperta
#78 20 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
20
Fork
32
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm using the `Bugsnag.notify` API and therfore have to

``` javascript
import Bugsnag from 'bugsnag';
```

However, this breaks my tests:
> Chrome 43.0 - Global error: Uncaught Error: Could not find module `bugsnag` imported from

Any suggestions here? I'm curious why `index.js` explicitly does not include bugsnag in `test` environments.

``` javascript
// index.js
this._includeBugsnag =
this.isDevelopingAddon() || process.env.EMBER_ENV !== 'test';
```

Any chance we could import just the `bugsnag/shim` in `test` environments?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.