Created
March 6, 2017 22:24
-
-
Save gauntface/c539ded88c42d9acebcd4d23e9c0b573 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
| it('should register install, activate and fetch event listeners', function() { | |
| const eventsListenedTo = []; | |
| global.self = { | |
| // Mock methods here | |
| addEventListener: (eventName, cb) => { | |
| eventsListenedTo.push(eventName); | |
| }, | |
| }; | |
| const myServiceWorkerLib = new Lib(); | |
| myServiceWorkerLib.setUpEventListeners(); | |
| eventsListenedTo.should.deep.equal(['install', 'activate', 'fetch']); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment