Last active
June 15, 2016 02:46
-
-
Save 1dolinski/ee95f1f89e2d5bc32a49b506d656ada5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var FireFunc = require("../js/services-fb-functions.js"); | |
| describe('Firebase Testing Suite', function() { | |
| var firebase; | |
| var testPath; | |
| var testResult = {}; | |
| beforeAll(function() { | |
| var firebaseFunctions = ['check'] | |
| firebase = jasmine.createSpyObj('firebase', firebaseFunctions) | |
| firebase.check.and.callFake(function() { | |
| return 2 | |
| }); | |
| }); | |
| describe('check', function() { | |
| it('is working?', function() { | |
| var x = FireFunc.zset() | |
| expect(x).toBe(3); // THIS IS RETURNING 1... which means the spyOn doesn't work for me ! | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var firebase = {}; | |
| firebase.check = function() { | |
| return 1; | |
| } | |
| module.exports = { | |
| zset: function() { | |
| return firebase.check(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment