-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
firebase sdk 3.0 support #109
Comments
I would also be interested in this or any alternative approach to testing Angular2 apps with AngularFire2. Any plans? |
+1 |
1 similar comment
+1 |
+1 and we are waiting for this here: googlearchive/firebase-util#96 (comment) |
@katowulf I wouldn't mind helping out to update this library to support firebase sdk 3.x.x if you can provide feedback on what needs to be changed I added the following to window.firebase = {
database: function() {
return {
ref: function(path) {
return new window.mockfirebase.MockFirebase(path);
}
};
}
}; I then updated Source export default class HomeController {
constructor($firebaseArray) {
var ref = firebase.database().ref().child('messages');
this.messages = $firebaseArray(ref);
return this;
}
submit(message) {
return this.messages.$add(message);
}
};
HomeController.$inject = ['$firebaseArray']; Test describe('HomeController', function() {
window.MockFirebase.override();
var controller;
beforeEach(function() {
module('application.home');
inject(function($controller, $firebaseArray) {
controller = $controller('HomeController', {
$firebaseArray: $firebaseArray
});
});
});
it('should read data from firebase', function() {
//save some data that our controller will read
var message = 'message';
controller.submit(message).then(function() {
expect(controller.messages).toContain(message);
});
});
}); The test above works only because I have the
EDIT
|
I was able to get basic support added for firebase sdk 3.x. See #112 for more info. |
Any update on this? |
I would also be interested in using mockFirebase with the 3.x.x SDK -- It seems that this project is dead now? I'd love to contribute to getting mockFirebase ready |
what about new sdk 3.0 support? as there is an official release this would be an interested option
https://firebase.google.com/docs/web/setup
The text was updated successfully, but these errors were encountered: