Last active
December 20, 2017 22:28
-
-
Save silvenon/0567b71204de85b411c3 to your computer and use it in GitHub Desktop.
Revisions
-
silvenon renamed this gist
Jul 14, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
silvenon revised this gist
Jul 13, 2015 . 2 changed files with 10 additions and 13 deletions.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 @@ -1,13 +0,0 @@ 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 @@ -1,9 +1,14 @@ import jsdom from 'jsdom'; import assert from 'assert'; describe('suite', () => { let React, utils, Component; before(() => { global.document = jsdom.jsdom('<!DOCTYPE html><html><head></head><body></body></html>'); global.window = document.parentWindow; global.navigator = {userAgent: 'node.js'}; React = require('react/addons'); utils = React.addons.TestUtils; Component = require('../components/component'); @@ -16,4 +21,9 @@ describe('suite', () => { assert(utils.isComponent(el)); }); after(() => { window.close(); delete document; }); }); -
silvenon revised this gist
Jul 13, 2015 . 1 changed file with 19 additions and 0 deletions.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,19 @@ import assert from 'assert'; describe('suite', () => { let React, utils, Component; before(() => { React = require('react/addons'); utils = React.addons.TestUtils; Component = require('../components/component'); }); it('should do something', () => { const el = utils.renderIntoDocument( <Component /> ); assert(utils.isComponent(el)); }); }); -
silvenon created this gist
Jul 13, 2015 .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,13 @@ import jsdom from 'jsdom'; // http://mochajs.org/#root-level-hooks before(() => { global.document = jsdom.jsdom('<!DOCTYPE html><html><head></head><body></body></html>'); global.window = document.parentWindow; global.navigator = {userAgent: 'node.js'}; }); after(() => { window.close(); });