Skip to content

Commit

Permalink
deps: should@~4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed May 29, 2014
1 parent 7a2a8d2 commit f75c172
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 36 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"devDependencies": {
"istanbul": "0.2.10",
"mocha": "~1.20.0",
"should": "~3.3.2",
"should": "~4.0.0",
"supertest": "~0.13.0"
},
"engines": {
Expand Down
54 changes: 19 additions & 35 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,13 @@ describe('serveIndex(root)', function () {
request(server)
.get('/')
.set('Accept', 'application/json')
.expect(200)
.expect('Content-Type', /json/)
.end(function (err, res) {
if (err) throw err;
res.body.should.include('g# %3 o %2525 %37 dir');
res.body.should.include('users');
res.body.should.include('file #1.txt');
res.body.should.include('nums');
res.body.should.include('todo.txt');
done();
});
.expect(/g# %3 o %2525 %37 dir/)
.expect(/users/)
.expect(/file #1\.txt/)
.expect(/nums/)
.expect(/todo\.txt/)
.expect(200, done)
});
});

Expand Down Expand Up @@ -193,7 +189,7 @@ describe('serveIndex(root)', function () {
.get('/')
.expect(200, function (err, res) {
if (err) return done(err)
res.text.should.not.include('.hidden')
res.text.should.not.containEql('.hidden')
done()
});
});
Expand All @@ -205,7 +201,7 @@ describe('serveIndex(root)', function () {
.get('/')
.expect(200, function (err, res) {
if (err) return done(err)
res.text.should.not.include('.hidden')
res.text.should.not.containEql('.hidden')
done()
});
});
Expand All @@ -215,11 +211,7 @@ describe('serveIndex(root)', function () {

request(server)
.get('/')
.expect(200, function (err, res) {
if (err) return done(err)
res.text.should.include('.hidden')
done()
});
.expect(200, /\.hidden/, done)
});
});

Expand All @@ -239,7 +231,7 @@ describe('serveIndex(root)', function () {
.expect(200, function (err, res) {
if (err) return done(err)
seen.should.be.true
res.text.should.not.include('foo')
res.text.should.not.containEql('foo')
done()
});
});
Expand Down Expand Up @@ -528,16 +520,12 @@ describe('serveIndex(root)', function () {
request(server)
.get('/')
.set('Accept', 'application/json')
.expect(200)
.expect('Content-Type', /json/)
.end(function (err, res) {
if (err) throw err;
res.body.should.include('users');
res.body.should.include('file #1.txt');
res.body.should.include('nums');
res.body.should.include('todo.txt');
done();
});
.expect(/users/)
.expect(/file #1\.txt/)
.expect(/nums/)
.expect(/todo\.txt/)
.expect(200, done)
});
});

Expand All @@ -551,15 +539,11 @@ describe('serveIndex(root)', function () {
request(server)
.get('/')
.set('Accept', 'application/json')
.expect(200)
.expect('Content-Type', /json/)
.end(function (err, res) {
if (err) throw err;
res.body.should.include('LICENSE');
res.body.should.include('public');
res.body.should.include('test');
done();
});
.expect(/LICENSE/)
.expect(/public/)
.expect(/test/)
.expect(200, done)
});

it('should not allow serving outside root', function (done) {
Expand Down

0 comments on commit f75c172

Please sign in to comment.