diff --git a/Makefile b/Makefile index a3cdac5f..7fbb7d1f 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,8 @@ setup: test: $(ISTANBUL) cover node_modules/.bin/_mocha -- --recursive --timeout 10000 $(ISTANBUL) check-coverage --branches 100 -ifneq ($(shell node --version | sed 's/[.][^.]*$$//'),v0.10) +ifeq ($(shell node --version | cut -d . -f 1),v6) $(DOCTEST) -- index.js +else + @echo '[WARN] Doctests are only run in Node v6.x.x (current version is $(shell node --version))' >&2 endif diff --git a/circle.yml b/circle.yml index c176f229..ab09a423 100644 --- a/circle.yml +++ b/circle.yml @@ -1,7 +1,8 @@ dependencies: override: + - printf '%s\n' color=false progress=false >.npmrc - rm -rf node_modules - - case $CIRCLE_NODE_INDEX in 0) make setup ;; 1) nvm exec 0.12.7 make setup ;; 2) nvm exec 4 make setup ;; 3) nvm exec 5 make setup ;; esac: + - case $CIRCLE_NODE_INDEX in 0) make setup ;; 1) nvm exec 0.12.7 make setup ;; 2) nvm exec 4 make setup ;; 3) nvm install 6 && nvm exec 6 make setup ;; esac: parallel: true machine: @@ -11,5 +12,5 @@ machine: test: override: - make lint - - case $CIRCLE_NODE_INDEX in 0) make test ;; 1) nvm exec 0.12.7 make test ;; 2) nvm exec 4 make test ;; 3) nvm exec 5 make test ;; esac: + - case $CIRCLE_NODE_INDEX in 0) make test ;; 1) nvm exec 0.12.7 make test ;; 2) nvm exec 4 make test ;; 3) nvm exec 6 make test ;; esac: parallel: true diff --git a/index.js b/index.js index 275d724d..a2ccadc8 100644 --- a/index.js +++ b/index.js @@ -1983,10 +1983,10 @@ //. Right(['foo', 'bar', 'baz']) //. //. > S.encaseEither(S.I, JSON.parse, '[') - //. Left(new SyntaxError('Unexpected end of input')) + //. Left(new SyntaxError('Unexpected end of JSON input')) //. //. > S.encaseEither(S.prop('message'), JSON.parse, '[') - //. Left('Unexpected end of input') + //. Left('Unexpected end of JSON input') //. ``` S.encaseEither = def('encaseEither',