File tree Expand file tree Collapse file tree 6 files changed +8
-8
lines changed
packages/react-router/modules Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class Prompt extends React.Component {
4444 componentWillMount ( ) {
4545 invariant (
4646 this . context . router ,
47- 'You should not use <Prompt> outside a valid <Router>'
47+ 'You should not use <Prompt> outside a <Router>'
4848 )
4949
5050 if ( this . props . when )
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class Redirect extends React.Component {
3737 componentWillMount ( ) {
3838 invariant (
3939 this . context . router ,
40- 'You should not use <Redirect> outside a valid <Router>'
40+ 'You should not use <Redirect> outside a <Router>'
4141 )
4242
4343 if ( this . isStatic ( ) )
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class Route extends React.Component {
5959
6060 invariant (
6161 router ,
62- 'You should not use <Route> or withRouter() outside a valid <Router>'
62+ 'You should not use <Route> or withRouter() outside a <Router>'
6363 )
6464
6565 const { route } = router
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class Switch extends React.Component {
2222 componentWillMount ( ) {
2323 invariant (
2424 this . context . router ,
25- 'You should not use <Switch> outside a valid <Router>'
25+ 'You should not use <Switch> outside a <Router>'
2626 )
2727 }
2828
Original file line number Diff line number Diff line change @@ -88,14 +88,14 @@ describe('A <Route>', () => {
8888 expect ( node . innerHTML ) . toContain ( '/sushi/spicy-tuna' )
8989 } )
9090
91- it ( 'crash explicitly with no valid <Router>' , ( ) => {
91+ it ( 'throws with no <Router>' , ( ) => {
9292 const node = document . createElement ( 'div' )
9393
9494 expect ( ( ) => {
9595 ReactDOM . render ( (
9696 < Route path = "/" render = { ( ) => null } />
9797 ) , node )
98- } ) . toThrow ( / Y o u s h o u l d n o t u s e < R o u t e > o r w i t h R o u t e r \( \) o u t s i d e a v a l i d < R o u t e r > / )
98+ } ) . toThrow ( / Y o u s h o u l d n o t u s e < R o u t e > o r w i t h R o u t e r \( \) o u t s i d e a < R o u t e r > / )
9999 } )
100100} )
101101
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ describe('A <Switch>', () => {
135135 expect ( node . innerHTML ) . toMatch ( / o n e / )
136136 } )
137137
138- it ( 'crash explicitly with no valid <Router>' , ( ) => {
138+ it ( 'throws with no <Router>' , ( ) => {
139139 const node = document . createElement ( 'div' )
140140
141141 expect ( ( ) => {
@@ -149,7 +149,7 @@ describe('A <Switch>', () => {
149149 ) } />
150150 </ Switch >
151151 ) , node )
152- } ) . toThrow ( / Y o u s h o u l d n o t u s e < S w i t c h > o u t s i d e a v a l i d < R o u t e r > / )
152+ } ) . toThrow ( / Y o u s h o u l d n o t u s e < S w i t c h > o u t s i d e a < R o u t e r > / )
153153 } )
154154} )
155155
You can’t perform that action at this time.
0 commit comments