[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

@@ -19,8 +19,8 @@ const modulePath = require('path').join(
const Path = require('path')
const Errors = require('../../../app/js/Errors')
describe('DockerLockManager', function() {
beforeEach(function() {
describe('DockerLockManager', function () {
beforeEach(function () {
this.LockManager = SandboxedModule.require(modulePath, {
requires: {
'settings-sharelatex': {},
@@ -39,14 +39,14 @@ describe('DockerLockManager', function() {
return (this.lockFile = '/local/compile/directory/.project-lock')
})
return describe('runWithLock', function() {
beforeEach(function() {
return describe('runWithLock', function () {
beforeEach(function () {
this.runner = sinon.stub().callsArgWith(0, null, 'foo', 'bar')
return (this.callback = sinon.stub())
})
describe('normally', function() {
beforeEach(function() {
describe('normally', function () {
beforeEach(function () {
this.Lockfile.lock = sinon.stub().callsArgWith(2, null)
this.Lockfile.unlock = sinon.stub().callsArgWith(1, null)
return this.LockManager.runWithLock(
@@ -56,19 +56,19 @@ describe('DockerLockManager', function() {
)
})
it('should run the compile', function() {
it('should run the compile', function () {
return this.runner.calledWith().should.equal(true)
})
return it('should call the callback with the response from the compile', function() {
return it('should call the callback with the response from the compile', function () {
return this.callback
.calledWithExactly(null, 'foo', 'bar')
.should.equal(true)
})
})
return describe('when the project is locked', function() {
beforeEach(function() {
return describe('when the project is locked', function () {
beforeEach(function () {
this.error = new Error()
this.error.code = 'EEXIST'
this.Lockfile.lock = sinon.stub().callsArgWith(2, this.error)
@@ -80,11 +80,11 @@ describe('DockerLockManager', function() {
)
})
it('should not run the compile', function() {
it('should not run the compile', function () {
return this.runner.called.should.equal(false)
})
it('should return an error', function() {
it('should return an error', function () {
this.callback
.calledWithExactly(sinon.match(Errors.AlreadyCompilingError))
.should.equal(true)