0
ember simple authをアップグレードする際に問題が発生しています。Ember Simple Authのアップグレード
import { authenticateSession } from '../helpers/ember-simple-auth';
任意の考えを、私はそれが働いて得るために行うために必要なものに:
TypeError: Cannot read property '__container__' of undefined
at authenticateSession (http://app.meetabe.dev:4200/assets/tests-a3c931e27860232e47d8de67d537cf75.js:298:24)
at Object.<anonymous> (http://app.meetabe.dev:4200/assets/tests-a3c931e27860232e47d8de67d537cf75.js:90:61)
は私が適切に使用して、新しいヘルパーメソッドをインポートしていますか?
ここは私のテストで、認証されたルートを訪れようとしています。
import { test } from 'qunit';
import moduleForAcceptance from '../helpers/module-for-acceptance';
import { authenticateSession } from '../helpers/ember-simple-auth';
moduleForAcceptance('Acceptance | overview');
test('visiting /overview', function(assert) {
authenticateSession();
visit('/overview');
andThen(function() {
assert.equal(currentURL(), '/overview');
});
});
をアプリに渡しますか?どのようなバージョンのemberを使用していますか?一般的に私的な '__container__'へのアクセスは以前は多くのアプリケーションで行われていましたが、アプリケーション上のDI APIや' Ember.getOwner'のようなパブリックAPIのために削除されました。 – Lux