Skip to content

Commit 4845bd4

Browse files
committed
Add istanbul ignore pragmas
1 parent ff37725 commit 4845bd4

File tree

7 files changed

+10
-0
lines changed

7 files changed

+10
-0
lines changed

modules/IndexRedirect.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const { string, object } = React.PropTypes
1212
class IndexRedirect extends Component {
1313

1414
static createRouteFromReactElement(element, parentRoute) {
15+
/* istanbul ignore else: sanity check */
1516
if (parentRoute) {
1617
parentRoute.indexRoute = Redirect.createRouteFromReactElement(element)
1718
} else {
@@ -30,6 +31,7 @@ class IndexRedirect extends Component {
3031
children: falsy
3132
}
3233

34+
/* istanbul ignore next: sanity check */
3335
render() {
3436
invariant(
3537
false,

modules/IndexRoute.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const { bool, func } = React.PropTypes
1313
class IndexRoute extends Component {
1414

1515
static createRouteFromReactElement(element, parentRoute) {
16+
/* istanbul ignore else: sanity check */
1617
if (parentRoute) {
1718
parentRoute.indexRoute = createRouteFromReactElement(element)
1819
} else {
@@ -31,6 +32,7 @@ class IndexRoute extends Component {
3132
getComponents: func
3233
}
3334

35+
/* istanbul ignore next: sanity check */
3436
render() {
3537
invariant(
3638
false,

modules/PropTypes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { PropTypes } from 'react'
33
const { func, object, arrayOf, oneOfType, element, shape, string } = PropTypes
44

55
export function falsy(props, propName, componentName) {
6+
/* istanbul ignore if: sanity check */
67
if (props[propName])
78
return new Error(`<${componentName}> should not have a "${propName}" prop`)
89
}

modules/Redirect.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class Redirect extends Component {
7171
children: falsy
7272
}
7373

74+
/* istanbul ignore next: sanity check */
7475
render() {
7576
invariant(
7677
false,

modules/Route.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class Route extends Component {
2121
static createRouteFromReactElement(element) {
2222
const route = createRouteFromReactElement(element)
2323

24+
/* istanbul ignore if: deprecation */
2425
if (route.handler) {
2526
warning(
2627
false,
@@ -43,6 +44,7 @@ class Route extends Component {
4344
getComponents: func
4445
}
4546

47+
/* istanbul ignore next: sanity check */
4648
render() {
4749
invariant(
4850
false,

modules/RouteUtils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function checkPropTypes(componentName, propTypes, props) {
1616
if (propTypes.hasOwnProperty(propName)) {
1717
const error = propTypes[propName](props, propName, componentName)
1818

19+
/* istanbul ignore if: error logging */
1920
if (error instanceof Error)
2021
warning(false, error.message)
2122
}

modules/Router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class Router extends Component {
6565
})
6666
}
6767

68+
/* istanbul ignore next: sanity check */
6869
componentWillReceiveProps(nextProps) {
6970
warning(
7071
nextProps.history === this.props.history,

0 commit comments

Comments
 (0)