Skip to content

Commit 82c2072

Browse files
author
Nick Maher
committed
Update test components to not reference window
1 parent 8e4e95e commit 82c2072

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/dummy/app/assets/javascripts/components/Todo.js.jsx.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Todo = React.createClass
44

55
# Because Coffee files are in an anonymous function,
66
# expose it for server rendering tests
7-
window.Todo = Todo
7+
this.Todo = Todo

test/dummy/app/assets/javascripts/example2.js.jsx.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Component = React.createClass
22
render: ->
33
`<ExampleComponent videos={this.props.videos} />`
44

5-
window.Component = Component
5+
this.Component = Component

test/react/jsx_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
});
1717
18-
window.Component = Component;
18+
this.Component = Component;
1919
}).call(this);
2020
eos
2121

0 commit comments

Comments
 (0)