-
Notifications
You must be signed in to change notification settings - Fork 939
/
Map-test.js
36 lines (29 loc) · 859 Bytes
/
Map-test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"use strict";
jest.dontMock("../Map.js");
jest.dontMock("../GoogleMapsMixin.js");
jest.dontMock("../mixins/ChildMixin.js");
jest.dontMock("../mixins/EventBindingMixin.js");
describe("Map", function() {
it("should render a canvas", function() {
var React = require("react/addons"),
Map = require("../Map.js"),
{TestUtils} = React.addons,
MockContext,
map,
divCanvas;
MockContext = React.createClass({
mixins: [require("../GoogleMapsMixin")],
render () {
return <div><Map /></div>;
}
});
map = TestUtils.findRenderedComponentWithType(
TestUtils.renderIntoDocument(<MockContext />),
Map
);
divCanvas = TestUtils.findRenderedDOMComponentWithTag(
map, "div"
);
expect(divCanvas.getDOMNode().getAttribute("style")).toEqual(null);
});
});