Created
July 5, 2016 04:28
-
-
Save pori/90c97dc05ecdb1e5174a4c78e8dae1f7 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
import test from 'ava'; | |
import EventTarget from '../build'; | |
class Window extends EventTarget {} | |
test(t => { | |
const window = new Window(); | |
const type = 'load'; | |
const cb = (event) => t.pass(); | |
window.addEventListener(type, cb); | |
window.dispatchEvent({ | |
type: type | |
}); | |
window.removeEventListener(type, cb); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment