I have an Ember.js application with Ember-CLI and using Firebase. When I run /tests the only error I get is the following:
Error: Please set the
firebase
property on the adapter. at init (http://localhost:4200/assets/vendor.js:99854:15) (...etc.)
My application.js adapter code is the standard following emberfire install:
import Ember from 'ember';
import FirebaseAdapter from 'emberfire/adapters/firebase';
const { inject } = Ember;
export default FirebaseAdapter.extend({
firebase: inject.service(),
});
and my firebase: URL is set in the environment.js file. Can anyone point me in the direction of where the problem might be? The application itself runs fine. I realise this is an error response built into the init function of emberfire, but that doesn't help me! I'm sure it must be something small and obvious to the initiated but I'm still on the learning curve...
Thanks in advance.
Ember 1.13.7 - Ember Data 1.13.8 - Firebase 2.3.0 - EmberFire 1.5.0 - jQuery 1.11.3
I solved this by modifying the tests/unit/adapters/application-test.js file to be:
import { moduleFor, test } from 'ember-qunit';
import FirebaseAdapter from 'emberfire/adapters/firebase';
moduleFor('adapter:application', 'Unit | Adapter | application', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
var adapter = FirebaseAdapter; //this.subject();
assert.ok(adapter);
});
Hope that helps someone else!