-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc client add dynamic add/remove proxy and server interfaces and add…
… test coverage and format codes
- Loading branch information
1 parent
dc9f5e1
commit 32210db
Showing
45 changed files
with
2,701 additions
and
2,639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.project | ||
node_modules/ | ||
coverage.html | ||
lib-cov/ | ||
lib-cov/ | ||
coverage.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
{ | ||
"predef": [ | ||
"describe", | ||
"it", | ||
"before", | ||
"after", | ||
"window", | ||
"describe", | ||
"it", | ||
"before", | ||
"after", | ||
"window", | ||
"__resources__" | ||
], | ||
"es5": true, | ||
"node": true, | ||
"eqeqeq": true, | ||
"undef": true, | ||
"curly": true, | ||
"bitwise": true, | ||
"immed": false, | ||
"newcap": true, | ||
"nonew": true | ||
"es5": true, | ||
"node": true, | ||
"eqeqeq": true, | ||
"undef": true, | ||
"curly": true, | ||
"bitwise": true, | ||
"immed": false, | ||
"newcap": true, | ||
"nonew": true, | ||
"white": false, | ||
"strict": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
SRC = $(shell find lib -type f -name "*.js") | ||
MOCHA_OPTS= | ||
TESTS = test/* | ||
REPORTER = spec | ||
REPORTER = dot | ||
TIMEOUT = 5000 | ||
|
||
test: | ||
@./node_modules/.bin/mocha \ | ||
--reporter $(REPORTER) --timeout $(TIMEOUT) $(TESTS) | ||
@NODE_ENV=test ./node_modules/.bin/mocha \ | ||
--reporter $(REPORTER) --timeout $(TIMEOUT) $(TESTS) \ | ||
$(MOCHA_OPTS) | ||
|
||
test-cov: lib-cov | ||
@JSCOV=1 $(MAKE) test REPORTER=html-cov > coverage.html && open coverage.html | ||
@POMELO_RPC_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html | ||
|
||
lib-cov: | ||
@rm -rf ./$@ | ||
@jscoverage lib $@ | ||
@jscoverage lib lib-cov | ||
|
||
clean: | ||
rm -rf lib-cov | ||
rm -f coverage.html | ||
rm -fr lib-cov | ||
|
||
.PHONY: test test-cov | ||
.PHONY: test clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
module.exports.client = require('./lib/rpc-client/client'); | ||
module.exports.server = require('./lib/rpc-server/server'); | ||
if(process.env.POMELO_RPC_COV) { | ||
module.exports.client = require('./lib-cov/rpc-client/client'); | ||
module.exports.server = require('./lib-cov/rpc-server/server'); | ||
} else { | ||
module.exports.client = require('./lib/rpc-client/client'); | ||
module.exports.server = require('./lib/rpc-server/server'); | ||
} |
Oops, something went wrong.