[misc] bump the dev-env to 3.3.2

This commit is contained in:
Jakob Ackermann
2020-08-10 17:01:11 +01:00
parent 1ee48d0274
commit f4561c2fe2
66 changed files with 1371 additions and 1458 deletions

View File

@@ -20,8 +20,8 @@ const modulePath = path.join(
)
const { expect } = require('chai')
describe('StaticServerForbidSymlinks', function() {
beforeEach(function() {
describe('StaticServerForbidSymlinks', function () {
beforeEach(function () {
this.settings = {
path: {
compilesDir: '/compiles/here'
@@ -60,8 +60,8 @@ describe('StaticServerForbidSymlinks', function() {
return (this.req.url = '/12345/output.pdf')
})
describe('sending a normal file through', function() {
beforeEach(function() {
describe('sending a normal file through', function () {
beforeEach(function () {
return (this.fs.realpath = sinon
.stub()
.callsArgWith(
@@ -71,8 +71,8 @@ describe('StaticServerForbidSymlinks', function() {
))
})
return it('should call next', function(done) {
this.res.sendStatus = function(resCode) {
return it('should call next', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(200)
return done()
}
@@ -80,8 +80,8 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a missing file', function() {
beforeEach(function() {
describe('with a missing file', function () {
beforeEach(function () {
return (this.fs.realpath = sinon
.stub()
.callsArgWith(
@@ -91,8 +91,8 @@ describe('StaticServerForbidSymlinks', function() {
))
})
return it('should send a 404', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 404', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(404)
return done()
}
@@ -100,15 +100,15 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a symlink file', function() {
beforeEach(function() {
describe('with a symlink file', function () {
beforeEach(function () {
return (this.fs.realpath = sinon
.stub()
.callsArgWith(1, null, `/etc/${this.req.params.project_id}/output.pdf`))
})
return it('should send a 404', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 404', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(404)
return done()
}
@@ -116,13 +116,13 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a relative file', function() {
beforeEach(function() {
describe('with a relative file', function () {
beforeEach(function () {
return (this.req.url = '/12345/../67890/output.pdf')
})
return it('should send a 404', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 404', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(404)
return done()
}
@@ -130,13 +130,13 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a unnormalized file containing .', function() {
beforeEach(function() {
describe('with a unnormalized file containing .', function () {
beforeEach(function () {
return (this.req.url = '/12345/foo/./output.pdf')
})
return it('should send a 404', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 404', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(404)
return done()
}
@@ -144,13 +144,13 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a file containing an empty path', function() {
beforeEach(function() {
describe('with a file containing an empty path', function () {
beforeEach(function () {
return (this.req.url = '/12345/foo//output.pdf')
})
return it('should send a 404', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 404', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(404)
return done()
}
@@ -158,13 +158,13 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a non-project file', function() {
beforeEach(function() {
describe('with a non-project file', function () {
beforeEach(function () {
return (this.req.url = '/.foo/output.pdf')
})
return it('should send a 404', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 404', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(404)
return done()
}
@@ -172,13 +172,13 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a file outside the compiledir', function() {
beforeEach(function() {
describe('with a file outside the compiledir', function () {
beforeEach(function () {
return (this.req.url = '/../bar/output.pdf')
})
return it('should send a 404', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 404', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(404)
return done()
}
@@ -186,13 +186,13 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a file with no leading /', function() {
beforeEach(function() {
describe('with a file with no leading /', function () {
beforeEach(function () {
return (this.req.url = './../bar/output.pdf')
})
return it('should send a 404', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 404', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(404)
return done()
}
@@ -200,8 +200,8 @@ describe('StaticServerForbidSymlinks', function() {
})
})
describe('with a github style path', function() {
beforeEach(function() {
describe('with a github style path', function () {
beforeEach(function () {
this.req.url = '/henryoswald-latex_example/output/output.log'
return (this.fs.realpath = sinon
.stub()
@@ -212,8 +212,8 @@ describe('StaticServerForbidSymlinks', function() {
))
})
return it('should call next', function(done) {
this.res.sendStatus = function(resCode) {
return it('should call next', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(200)
return done()
}
@@ -221,13 +221,13 @@ describe('StaticServerForbidSymlinks', function() {
})
})
return describe('with an error from fs.realpath', function() {
beforeEach(function() {
return describe('with an error from fs.realpath', function () {
beforeEach(function () {
return (this.fs.realpath = sinon.stub().callsArgWith(1, 'error'))
})
return it('should send a 500', function(done) {
this.res.sendStatus = function(resCode) {
return it('should send a 500', function (done) {
this.res.sendStatus = function (resCode) {
resCode.should.equal(500)
return done()
}