Created
February 15, 2017 14:50
-
-
Save scopevale/328971593eeafca0c11d229fd0989a8b to your computer and use it in GitHub Desktop.
Revisions
-
alopes revised this gist
Sep 17, 2015 . 1 changed file with 8 additions and 8 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 @@ -3,14 +3,14 @@ import _ from 'lodash'; import PubSub from 'pubsub-js'; class Example extends React.Component{ bar(e){ console.log('Bar called') } render() { return( <button ref="foo" onClick={this.bar}>Hey</button> ) } }; export default Example; -
alopes revised this gist
Sep 17, 2015 . 1 changed file with 8 additions and 8 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 @@ -3,14 +3,14 @@ import _ from 'lodash'; import PubSub from 'pubsub-js'; class Example extends React.Component{ bar(e){ console.log('Bar called') } render() { return( <button ref="foo" onClick={this.bar}>Hey</button> ) } }; export default Example; -
alopes revised this gist
Sep 17, 2015 . 1 changed file with 6 additions and 6 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 @@ -6,18 +6,18 @@ var Example = require('./Example.jsx'); var example; beforeEach(function() { spyOn(Example.prototype, 'bar'); example = TestUtils.renderIntoDocument(<Example />); }); it('should exist', function() { expect(TestUtils.isCompositeComponent(example)).toBeTruthy(); }); it('should call bar() onClick', function() { var button = React.findDOMNode(pagination.refs.foo); TestUtils.Simulate.click(button); expect( example.bar ).toHaveBeenCalled(); }); }); -
alopes revised this gist
Sep 17, 2015 . 1 changed file with 17 additions and 17 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,23 +1,23 @@ describe('Example Test', function() { var React = require('react/addons'); var TestUtils = React.addons.TestUtils; var Example = require('./Example.jsx'); var example; beforeEach(function() { spyOn(Example.prototype, 'bar'); example = TestUtils.renderIntoDocument(<Example />); }); it('should exist', function() { expect(TestUtils.isCompositeComponent(example)).toBeTruthy(); }); it('should call bar() onClick', function() { var button = React.findDOMNode(pagination.refs.foo); TestUtils.Simulate.click(button); expect( example.bar ).toHaveBeenCalled(); }); }); -
alopes revised this gist
Sep 17, 2015 . 1 changed file with 3 additions and 3 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 @@ -15,9 +15,9 @@ describe('Example Test', function() { }); it('should call bar() onClick', function() { var button = React.findDOMNode(pagination.refs.foo); TestUtils.Simulate.click(button); expect( example.bar ).toHaveBeenCalled(); }); }); -
alopes revised this gist
Sep 17, 2015 . 1 changed file with 4 additions and 6 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 @@ -15,11 +15,9 @@ describe('Example Test', function() { }); it('should call bar() onClick', function() { var button = React.findDOMNode(pagination.refs.foo); TestUtils.Simulate.click(button); expect( example.bar ).toHaveBeenCalled(); }); }); -
alopes revised this gist
Sep 17, 2015 . 1 changed file with 4 additions and 2 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 @@ -6,7 +6,7 @@ describe('Example Test', function() { var example; beforeEach(function() { spyOn(Example.prototype, 'bar'); example = TestUtils.renderIntoDocument(<Example />); }); @@ -20,4 +20,6 @@ describe('Example Test', function() { expect( example.bar ).toHaveBeenCalled(); }); }); // -
alopes revised this gist
Sep 17, 2015 . No changes.There are no files selected for viewing
-
alopes revised this gist
Sep 17, 2015 . 1 changed file with 3 additions and 4 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 @@ -7,11 +7,10 @@ class Example extends React.Component{ console.log('Bar called') } render() { return( <button ref="foo" onClick={this.bar}>Hey</button> ) } }; export default Example; -
alopes created this gist
Sep 17, 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,17 @@ import React from 'react'; import _ from 'lodash'; import PubSub from 'pubsub-js'; class Example extends React.Component{ bar(e){ console.log('Bar called') } render() { return( <button ref="foo" onClick={this.bar}>Hey</button> ) } }; export default Example; 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,23 @@ describe('Example Test', function() { var React = require('react/addons'); var TestUtils = React.addons.TestUtils; var Example = require('./Example.jsx'); var example; beforeEach(function() { spyOn(Example.prototype, 'bar'); example = TestUtils.renderIntoDocument(<Example />); }); it('should exist', function() { expect(TestUtils.isCompositeComponent(example)).toBeTruthy(); }); it('should call bar() onClick', function() { var button = React.findDOMNode(pagination.refs.foo); TestUtils.Simulate.click(button); expect( example.bar ).toHaveBeenCalled(); }); });