Skip to content

Commit

Permalink
remove connect(middleware...)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanong committed Jan 8, 2014
1 parent 2227816 commit 2cd33c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* move middleware to separate repos
* remove docs
* remove node patches
* remove connect(middleware...)

2.x
===================
Expand Down
3 changes: 0 additions & 3 deletions lib/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ function createServer() {
utils.merge(app, EventEmitter.prototype);
app.route = '/';
app.stack = [];
for (var i = 0; i < arguments.length; ++i) {
app.use(arguments[i]);
}
return app;
};

Expand Down
9 changes: 6 additions & 3 deletions test/directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ describe('directory()', function(){
});

describe('when setting a custom template', function () {
var app = connect(connect.directory('test/fixtures', {'template': __dirname + '/shared/template.html'}));
var app = connect();
app.use(connect.directory('test/fixtures', {'template': __dirname + '/shared/template.html'}));

it('should respond with file list and testing template sentence', function (done) {
app.request()
Expand All @@ -138,7 +139,8 @@ describe('directory()', function(){
});

describe('when set with trailing slash', function () {
var app = connect(connect.directory('test/fixtures/'));
var app = connect();
app.use(connect.directory('test/fixtures/'));

it('should respond with file list', function (done) {
app.request()
Expand All @@ -157,7 +159,8 @@ describe('directory()', function(){
});

describe('when set to \'.\'', function () {
var app = connect(connect.directory('.'));
var app = connect();
app.use(connect.directory('.'));

it('should respond with file list', function (done) {
app.request()
Expand Down

0 comments on commit 2cd33c6

Please sign in to comment.