Merge pull request #924 from strongloop/refactor/remove-makefile

Use mocha instead of Makefile for testing
This commit is contained in:
Simon Ho 2016-05-10 11:59:33 -07:00
commit 1d39e41d00
2 changed files with 3 additions and 49 deletions

View File

@ -1,43 +0,0 @@
TESTER = ./node_modules/.bin/mocha
OPTS = --growl
TESTS = test/*.test.js
default: help
.PHONY: clean
clean:
rm -rf $(CURDIR)/node_modules
.PHONY: help
help:
@echo 'Usage: make [target]'
@echo 'Targets:'
@echo ' clean Delete `node_modules`'
@echo ' help Print help (this message)'
@echo ' refresh Delete `node_modules` and run `npm install`'
@echo ' test Run tests in silent mode'
@echo ' test-verbose Run tests in verbose mode'
@echo ' testing Run tests continuously'
.PHONY: refresh
refresh: clean
npm install
.PHONY: test
test:
NO_DEPRECATION=loopback-datasource-juggler $(TESTER) $(OPTS) $(TESTS)
.PHONY: test-verbose
test-verbose:
$(TESTER) $(OPTS) --reporter spec $(TESTS)
.PHONY: testing
testing:
$(TESTER) $(OPTS) --watch $(TESTS)
# Deprecated targets
.PHONY: about-testing
about-testing:
@echo 'DEPRECATED: Use `make help` instead'
make help

View File

@ -24,12 +24,9 @@
"depd": "./lib/browser.depd.js"
},
"scripts": {
"clean": "make clean",
"help": "make help",
"refresh": "make refresh",
"test": "make test",
"posttest": "npm run lint",
"lint": "eslint ."
"lint": "eslint .",
"test": "mocha",
"posttest": "npm run lint"
},
"engines": [
"node >= 0.6"