Skip to content

Commit

Permalink
fix test case that caused by nodejs.org
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Sep 20, 2015
1 parent d9631e0 commit d47f13e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test: install-test
test-cov: install-test
@$(ISTANBUL) cover --report html $(MOCHA) -- -R $(REPORTER) $(TESTS)

test-all: test test-cov
test-all: test-cov

autod: install-test
@./node_modules/.bin/autod -w -e components,build
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
"fengmk2 <[email protected]>"
],
"dependencies": {
"debug": "2.1.3"
"debug": "2.2.0"
},
"devDependencies": {
"autod": "*",
"chai": "1.9.0",
"browser": "0.2.6",
"chai": "3.2.0",
"contributors": "*",
"eventproxy": "0.2.7",
"growl": "1.7.0",
"jade": "1.3.0",
"mocha": "1.17.1",
"pedding": "0.0.3",
"istanbul": "*"
"eventproxy": "0.3.4",
"growl": "1.8.1",
"istanbul": "*",
"jade": "1.11.0",
"mocha": "2.3.2",
"pedding": "1.0.0"
},
"scripts": {
"test": "make test-all"
Expand Down
5 changes: 4 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ describe("EventProxy", function () {

describe('errorHandler mode', function () {
it('should auto handler callback error', function (done) {
this.timeout(4000);
done = pedding(2, done);
var ep = EventProxy.create('data', 'foo', 'cnodejs', function (data, foo, cnodejs) {
throw new Error('should not call this');
Expand All @@ -536,6 +537,7 @@ describe("EventProxy", function () {
});

it('should success callback after all event emit', function (done) {
this.timeout(4000);
done = pedding(3, done);
var ep = EventProxy.create('data', 'data2', 'cnodejs', function (data, data2, cnodejs) {
should.exist(data);
Expand All @@ -558,6 +560,7 @@ describe("EventProxy", function () {
});

it('should success callback(err, args1, args2) after all event emit', function (done) {
this.timeout(4000);
done = pedding(3, done);
var ep = EventProxy.create('data', 'dirs', 'cnodejs', 'mockGet', 'mockGet2',
function (data, dirs, cnodejs, getDatas, getDatas2) {
Expand All @@ -576,7 +579,7 @@ describe("EventProxy", function () {

fs.readFile(__filename, ep.done('data'));
http.get({ host: 'nodejs.org' }, function (res) {
assert.deepEqual(res.statusCode, 200);
assert.deepEqual(res.statusCode, 302);
ep.emit('cnodejs', res);
done();
});
Expand Down

0 comments on commit d47f13e

Please sign in to comment.