diff --git a/package.json b/package.json index 374862e..09b29f6 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "main": "dist/switcheroo.min.js", "scripts": { "build": "./node_modules/.bin/webpack", - "lint": "./node_modules/.bin/eslint ./modules", + "lint-src": "./node_modules/.bin/eslint ./modules", + "lint-test": "./node_modules/.bin/eslint ./test", + "lint": "npm run lint-src && npm run lint-test", "test": "./node_modules/.bin/karma start --single-run" }, "repository": { diff --git a/test/components/Switcher_test.js b/test/components/Switcher_test.js index d309246..319ce2a 100644 --- a/test/components/Switcher_test.js +++ b/test/components/Switcher_test.js @@ -1,4 +1,4 @@ -import React, {Component} from 'react'; +import React, {Component, PropTypes} from 'react'; import {assert} from 'chai'; import sinon from 'sinon'; import window from 'window'; @@ -10,6 +10,11 @@ class Handler extends Component { } } +Handler.displayName = 'Handler'; +Handler.propTypes = { + text: PropTypes.string +}; + describe('Switcher', function() { describe('#getLocation', function() { describe('using location.hash', function() { diff --git a/test/test_index.js b/test/test_index.js index ed274d5..b4b7af4 100644 --- a/test/test_index.js +++ b/test/test_index.js @@ -1,4 +1,4 @@ // require all modules ending in "_test" from the // current directory and all subdirectories -var testsContext = require.context(".", true, /_test$/); +var testsContext = require.context('.', true, /_test$/); testsContext.keys().forEach(testsContext);