Last active
August 29, 2015 14:13
-
-
Save adamrneary/4c2eff5e3c893e36ed8e 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
| describe('VideoEvents', function(){ | |
| var projectRef = getFirebaseRef(); | |
| var testId = getUniqueId(); | |
| describe('Video View', function(){ | |
| var eventName = 'Video View'; | |
| before(function(done) { | |
| projectRef | |
| .child(testId) | |
| .child('events/' + eventName) | |
| .set(100, done); | |
| }) | |
| after(function(done) { | |
| projectRef | |
| .child(testId) | |
| .remove(done); | |
| }) | |
| it('should increment the video view event value', function(done){ | |
| var testObject = packageEvent(generateEvent(testId, eventName)); | |
| var testContext = { | |
| done: function(error, message) { | |
| projectRef | |
| .child(testId) | |
| .child('events/' + eventName) | |
| .once("value", function(snapshot) { | |
| assert.equal(101, snapshot.val()); | |
| done(); | |
| }); | |
| } | |
| }; | |
| VideoEvents.handler(testObject, testContext); | |
| }) | |
| }) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment