Skip to content

Commit

Permalink
deps: 升级 mocha 版本等
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed Apr 11, 2021
1 parent 746dc01 commit 60bd518
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/node.js.yml
Expand Up @@ -27,7 +27,9 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm run test-npm
- run: |
npm run test-npm
cat coverage/lcov.info | ./node_modules/.bin/coveralls
- run: npm run test-cli
- run: npm run benchmark
- run: cat coverage/lcov.info | ./node_modules/.bin/coveralls
- run:
23 changes: 3 additions & 20 deletions Makefile
@@ -1,27 +1,13 @@
version = $(shell cat package.json | grep version | awk -F'"' '{print $$4}')

install:
@spm install
@npm install

build:
@spm build

publish:
@npm publish
@git tag $(version)
@git push origin $(version)

build-doc: clean build
@spm doc build

watch:
@spm doc watch

publish-doc: clean build-doc
@ghp-import _site
@git push origin gh-pages

clean:
@rm -fr _site

Expand All @@ -32,7 +18,7 @@ benchmark:
@node tests/benchmark.test.js

test-cli:
@mocha -R spec --timeout 5000 tests/cli.test.js
@./node_modules/.bin/mocha -R spec --timeout 5000 tests/cli.test.js

test-npm:
@./node_modules/.bin/istanbul cover \
Expand All @@ -45,16 +31,13 @@ test-npm:
./tests/test.js


test-spm:
@spm test

lint:
@./node_modules/eslint/bin/eslint.js ./lib/ ./bin/ ./tests/

test: lint test-npm test-cli benchmark

output = _site/coverage.html
coverage: build-doc
coverage:
@rm -fr _site/src-cov
@jscoverage --encoding=utf8 src _site/src-cov
@mocha-browser ${runner}?cov -S -R html-cov > ${output}
Expand Down Expand Up @@ -83,4 +66,4 @@ dict-node:
infrequent:
@node ./tools/infrequent.js > ./tools/zi/infrequent.js

.PHONY: build-doc publish-doc server clean test coverage test-spm test-npm test-cli lint benchmark
.PHONY: server clean test coverage test-npm test-cli lint benchmark
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -36,7 +36,7 @@
"scripts": {
"lint": "eslint ./lib/ ./bin/ ./tests/",
"test-cli": "mocha -R spec --timeout 5000 tests/cli.test.js",
"test-npm": "istanbul cover mocha -- --harmony --reporter spec --timeout 2000 --inline-diffs ./tests/test.js",
"test-npm": "istanbul cover _mocha -- --harmony --reporter spec --timeout 2000 --inline-diffs ./tests/test.js",
"benchmark": "node tests/benchmark.test.js",
"test": "npm run lint && npm run test-cli && npm run test-npm && npm run benchmark"
},
Expand All @@ -53,7 +53,7 @@
"eslint": "~0.24.0",
"expect.js": "~0.3.1",
"istanbul": "~0.3.17",
"mocha": "1.17.1",
"mocha": "^8.3.2",
"request": "~2.68.0"
},
"spm": {
Expand Down

0 comments on commit 60bd518

Please sign in to comment.