Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup tests for middleware and replaced express dev dependency with…
… connect
- Loading branch information
Showing
5 changed files
with
53 additions
and
80 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
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 |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
"devDependencies": { | ||
"should": "*", | ||
"mocha": "*", | ||
"express": "*", | ||
"connect": "*", | ||
"uglify-js": "*" | ||
} | ||
} |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
var should = require('should'); | ||
var support = require('./support/client-server'); | ||
var jayson = require(__dirname + '/..'); | ||
var connect = require('connect'); | ||
|
||
describe('jayson middleware', function() { | ||
|
||
var server; | ||
var stack = connect.createServer(); | ||
stack.use(connect.json({reviver: support.options.reviver})); | ||
stack.use(jayson.server(support.methods, support.options).middleware()); | ||
|
||
var client = jayson.client.http({ | ||
reviver: support.options.reviver, | ||
replacer: support.options.replacer, | ||
host: 'localhost', | ||
port: 3000 | ||
}); | ||
|
||
before(function(done) { server = stack.listen(3000, done); }); | ||
|
||
it('should be able to receive a success-method from a client', support.clientRequest(client)); | ||
|
||
it('should be able to receive an error-method from a client', support.clientError(client)); | ||
|
||
it('should support reviving and replacing', support.clientReviveReplace(client)); | ||
|
||
it('should be able to handle a notification', support.clientNotification(client)); | ||
|
||
it('should be able to handle a batch request', support.clientBatch(client)); | ||
|
||
after(function(done) { | ||
server.once('close', done); | ||
server.close(); | ||
}) | ||
|
||
}); |
This file was deleted.
Oops, something went wrong.