Skip to content

Commit

Permalink
Use renderIntoDocument react test helper
Browse files Browse the repository at this point in the history
This allows us to view the jasmine results since the components are
rendered off screen instead of blowing away the jasmine test runner.
  • Loading branch information
JustinTulloss committed Dec 28, 2014
1 parent cad4742 commit d3a675d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions tests/specs/reactfire.spec.js
Expand Up @@ -30,7 +30,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsArray() throws errors given invalid bind variables", function() {
Expand All @@ -55,7 +55,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsArray() does not throw errors given valid inputs", function() {
Expand All @@ -75,7 +75,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsArray() does not throw an error given a limit query", function() {
Expand All @@ -93,7 +93,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsArray() binds to remote Firebase data as an array", function(done) {
Expand All @@ -118,7 +118,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsArray() binds to remote Firebase data as an array (limit query)", function(done) {
Expand All @@ -143,7 +143,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});
});

Expand All @@ -170,7 +170,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsObject() throws errors given invalid bind variables", function() {
Expand All @@ -195,7 +195,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsObject() does not throw errors given valid inputs", function() {
Expand All @@ -215,7 +215,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsObject() does not throw an error given a limit query", function() {
Expand All @@ -233,7 +233,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsObject() binds to remote Firebase data as an object", function(done) {
Expand All @@ -258,7 +258,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("bindAsObject() binds to remote Firebase data as an object (limit query)", function(done) {
Expand All @@ -283,7 +283,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});
});

Expand All @@ -310,7 +310,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("unbind() throws errors given unbound bind variable", function() {
Expand All @@ -335,7 +335,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("unbind() does not throw errors given valid bind variables", function() {
Expand All @@ -356,7 +356,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("unbind() does not throw an error given a limit query", function() {
Expand All @@ -377,7 +377,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("unbind() unbinds the state bound to Firebase as an array", function(done) {
Expand All @@ -404,7 +404,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("unbind() unbinds the state bound to Firebase as an object", function(done) {
Expand All @@ -431,7 +431,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});
});

Expand Down Expand Up @@ -460,7 +460,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});

it("_bind() does not throw error given valid inputs", function() {
Expand All @@ -479,7 +479,7 @@ describe("ReactFireMixin Tests:", function() {
}
});

React.render(new TestComponent(), document.body);
ReactTestUtils.renderIntoDocument(new TestComponent());
});
});
});

0 comments on commit d3a675d

Please sign in to comment.