Skip to content

Commit

Permalink
Easier debugging (#202)
Browse files Browse the repository at this point in the history
Enabling DEBUG: `make test NPM_TEST_TARGET=test.debug`
  • Loading branch information
filipesperandio authored Mar 9, 2017
1 parent fc77865 commit 83e7b24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

IMAGE_NAME ?= codeclimate/codeclimate-eslint

NPM_TEST_TARGET ?= test

image:
docker build --rm -t $(IMAGE_NAME) .

test: image
docker run --rm $(IMAGE_NAME) sh -c "cd /usr/src/app && npm run test"
docker run -ti --rm \
--volume $(PWD):/code \
--workdir /code \
$(IMAGE_NAME) npm run $(NPM_TEST_TARGET)

citest:
docker run --rm $(IMAGE_NAME) sh -c "cd /usr/src/app && npm run test"
docker run --rm \
--workdir /usr/src/app \
$(IMAGE_NAME) npm run test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"temp": "^0.8.3"
},
"scripts": {
"test": "mocha test"
"test": "mocha test",
"test.debug": "mocha debug test"
},
"engine": "node >= 0.12.4"
}

0 comments on commit 83e7b24

Please sign in to comment.