Created
February 5, 2016 18:20
Revisions
-
quidmonkey created this gist
Feb 5, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ import jQuery from 'jquery'; export const attachEvents = someStr => { jQuery(document).ready(e => { // do something cool with someStr }); }; 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ import test from 'ava'; import { jsdom } from 'jsdom'; import { attachEvents } from './foo' global.document = jsdom(); global.window = document.defaultView; test('test:attachEvents', t => { const ret = attachEvents('mockStr'); t.true(ret); });