1- import renderRoutes from '../renderRoutes'
2- import expect from 'expect'
31import React from 'react'
4- import { renderToString } from 'react-dom/server'
2+ import ReactDOMServer from 'react-dom/server'
53import StaticRouter from 'react-router/StaticRouter'
4+ import renderRoutes from '../renderRoutes'
65
76describe ( 'renderRoutes' , ( ) => {
87 let rendered
@@ -21,7 +20,7 @@ describe('renderRoutes', () => {
2120 }
2221 const routes = [ routeToMatch ]
2322
24- renderToString (
23+ ReactDOMServer . renderToString (
2524 < StaticRouter location = '/path' context = { { } } >
2625 { renderRoutes ( routes ) }
2726 </ StaticRouter >
@@ -40,7 +39,7 @@ describe('renderRoutes', () => {
4039 component : Comp
4140 } ]
4241
43- renderToString (
42+ ReactDOMServer . renderToString (
4443 < StaticRouter location = '/' context = { { } } >
4544 { renderRoutes ( routes ) }
4645 </ StaticRouter >
@@ -65,7 +64,7 @@ describe('renderRoutes', () => {
6564 component : Comp
6665 } ]
6766
68- renderToString (
67+ ReactDOMServer . renderToString (
6968 < StaticRouter location = '/' context = { { } } >
7069 { renderRoutes ( routes ) }
7170 </ StaticRouter >
@@ -92,7 +91,7 @@ describe('renderRoutes', () => {
9291 exact : true
9392 } , routeToMatch ]
9493
95- renderToString (
94+ ReactDOMServer . renderToString (
9695 < StaticRouter location = '/path/child' context = { { } } >
9796 { renderRoutes ( routes ) }
9897 </ StaticRouter >
@@ -114,12 +113,12 @@ describe('renderRoutes', () => {
114113 } ]
115114 } ]
116115
117- renderToString (
116+ ReactDOMServer . renderToString (
118117 < StaticRouter location = '/path/child' context = { { } } >
119118 { renderRoutes ( routes ) }
120119 </ StaticRouter >
121120 )
122- renderToString (
121+ ReactDOMServer . renderToString (
123122 < StaticRouter location = '/' context = { { } } >
124123 { renderRoutes ( routes ) }
125124 </ StaticRouter >
@@ -144,12 +143,12 @@ describe('renderRoutes', () => {
144143 } ]
145144 } ]
146145
147- renderToString (
146+ ReactDOMServer . renderToString (
148147 < StaticRouter location = '/path/child/grandchild' context = { { } } >
149148 { renderRoutes ( routes ) }
150149 </ StaticRouter >
151150 )
152- renderToString (
151+ ReactDOMServer . renderToString (
153152 < StaticRouter location = '/path' context = { { } } >
154153 { renderRoutes ( routes ) }
155154 </ StaticRouter >
@@ -177,7 +176,7 @@ describe('renderRoutes', () => {
177176 // should render
178177 } , routeToMatch ]
179178
180- renderToString (
179+ ReactDOMServer . renderToString (
181180 < StaticRouter location = '/path/' context = { { } } >
182181 { renderRoutes ( routes ) }
183182 </ StaticRouter >
@@ -199,17 +198,17 @@ describe('renderRoutes', () => {
199198 } ]
200199 } ]
201200
202- renderToString (
201+ ReactDOMServer . renderToString (
203202 < StaticRouter location = '/path/child' context = { { } } >
204203 { renderRoutes ( routes ) }
205204 </ StaticRouter >
206205 )
207- renderToString (
206+ ReactDOMServer . renderToString (
208207 < StaticRouter location = '/' context = { { } } >
209208 { renderRoutes ( routes ) }
210209 </ StaticRouter >
211210 )
212- renderToString (
211+ ReactDOMServer . renderToString (
213212 < StaticRouter location = '/path' context = { { } } >
214213 { renderRoutes ( routes ) }
215214 </ StaticRouter >
@@ -245,12 +244,12 @@ describe('renderRoutes', () => {
245244 } ]
246245 } ]
247246
248- renderToString (
247+ ReactDOMServer . renderToString (
249248 < StaticRouter location = '/path/child/grandchild' context = { { } } >
250249 { renderRoutes ( routes ) }
251250 </ StaticRouter >
252251 )
253- renderToString (
252+ ReactDOMServer . renderToString (
254253 < StaticRouter location = '/path/' context = { { } } >
255254 { renderRoutes ( routes ) }
256255 </ StaticRouter >
0 commit comments