私のアプリケーションでは、GooglePlaceRetriever サービスでクラス メソッドをテストしたいと考えています。Ember-Cli でテストするときに this.subject() を使用してサービスのインスタンスを取得できることはわかっていますが、実際の GooglePlaceRetriever オブジェクト自体にアクセスしてクラス メソッドをテストする方法がわかりません。
import {
moduleFor,
test
} from 'ember-qunit';
moduleFor('service:google-place-retriever', 'GooglePlaceRetrieverService', {
// Specify the other units that are required for this test.
// needs: ['service:foo']
});
// Replace this with your real tests.
test('it exists', function() {
var service = this.subject();
ok(service);
});
test('fetches place details from Google and converts it to a location', function()
//Cannot figure out how to access the Class as opposed to the instance.
var location = ???.findByPlaceId('ChIJaeKPQD_zz4kRy4c8TvnwGIg');
ok(location.get('name'), "My Name");
});