Skip to content

Commit b4fcecd

Browse files
committed
Add npm dependency check to test harness
1 parent d19f2d7 commit b4fcecd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Binaries
33
##
44

5+
DEPCHECK := node_modules/.bin/npm-check
56
ESLINT := node_modules/.bin/eslint
67
KARMA := node_modules/.bin/karma
78

@@ -51,6 +52,11 @@ distclean: clean
5152
rm -rf node_modules
5253
.PHONY: distclean
5354

55+
# Check for stale or missing dependencies.
56+
check-dependencies:
57+
@$(DEPCHECK) --production --no-color --no-emoji
58+
@echo
59+
5460
# Lint JavaScript source files.
5561
lint: install
5662
@$(ESLINT) $(ALL_FILES)
@@ -66,7 +72,6 @@ test-unit: install
6672
@$(KARMA) start $(KARMA_FLAGS)
6773

6874
# Default test target.
69-
test: lint test-unit
70-
75+
test: lint check-dependencies test-unit
7176
.PHONY: test
7277
.DEFAULT_GOAL = test

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"karma-sauce-launcher": "^1.0.0",
3434
"karma-spec-reporter": "0.0.26",
3535
"mocha": "^2.2.5",
36+
"npm-check": "^5.2.1",
3637
"phantomjs-prebuilt": "^2.1.7",
3738
"watchify": "^3.7.0"
3839
}

0 commit comments

Comments
 (0)