アドオン コンポーネントの 1 つの統合テストを書いています。また、 npm linkを使用して兄弟プロジェクトにリンクしました:
.. projects/
.... my-project/
.... my-linked-project/
問題のコンポーネントでmy-linked-project
ミックスインの1 つを使用します。my-project
//my-project/addon/components/my-component/component.js
import Ember from 'ember';
import ExternalMixin from 'my-linked-project/mixins/foo'
export default Ember.Component.extend(ExternalMixin, {
...
}
これは実行中のアプリケーションで正常に動作しますがrender
、統合テストでいくつかの問題が発生するようです。
//my-project/tests/integration/components/my-component-test.js
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('my-component', 'Integration description', {
integration: true
}
test('should render', function() {
this.render(hbs`{{my-component}}`);
}
しかし、私は得るError: Could not find module 'my-linked-project/mixins/foo'
。
render
/hbs
が呼び出され たときに何が起こるかについて、どこで詳しく読むことができますか?- 問題は、外部リンクされたプロジェクトを見つけることができないテスト ファイルの場所でしょうか?