mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #59 from overleaf/em-upgrade-node-12
Upgrade to Node 12
This commit is contained in:
commit
bf73c42924
9 changed files with 24 additions and 13 deletions
3
services/contacts/.mocharc.json
Normal file
3
services/contacts/.mocharc.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"require": "test/setup.js"
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
10.23.1
|
12.21.0
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Instead run bin/update_build_scripts from
|
# Instead run bin/update_build_scripts from
|
||||||
# https://github.com/sharelatex/sharelatex-dev-environment
|
# https://github.com/sharelatex/sharelatex-dev-environment
|
||||||
|
|
||||||
FROM node:10.23.1 as base
|
FROM node:12.21.0 as base
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,10 @@ DOCKER_COMPOSE_TEST_UNIT = \
|
||||||
COMPOSE_PROJECT_NAME=test_unit_$(BUILD_DIR_NAME) $(DOCKER_COMPOSE)
|
COMPOSE_PROJECT_NAME=test_unit_$(BUILD_DIR_NAME) $(DOCKER_COMPOSE)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
docker rmi ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
-docker rmi ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
||||||
docker rmi gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
-docker rmi gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
||||||
|
-$(DOCKER_COMPOSE_TEST_UNIT) down --rmi local
|
||||||
|
-$(DOCKER_COMPOSE_TEST_ACCEPTANCE) down --rmi local
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(DOCKER_COMPOSE) run --rm test_unit npm run --silent format
|
$(DOCKER_COMPOSE) run --rm test_unit npm run --silent format
|
||||||
|
|
|
@ -3,6 +3,6 @@ contacts
|
||||||
--docker-repos=gcr.io/overleaf-ops
|
--docker-repos=gcr.io/overleaf-ops
|
||||||
--env-add=
|
--env-add=
|
||||||
--env-pass-through=
|
--env-pass-through=
|
||||||
--node-version=10.23.1
|
--node-version=12.21.0
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=3.4.0
|
--script-version=3.7.0
|
||||||
|
|
|
@ -6,7 +6,7 @@ version: "2.3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
test_unit:
|
test_unit:
|
||||||
image: node:10.23.1
|
image: node:12.21.0
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
|
@ -18,7 +18,7 @@ services:
|
||||||
user: node
|
user: node
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
image: node:10.23.1
|
image: node:12.21.0
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
|
|
9
services/contacts/test/setup.js
Normal file
9
services/contacts/test/setup.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
const SandboxedModule = require('sandboxed-module')
|
||||||
|
|
||||||
|
SandboxedModule.configure({
|
||||||
|
requires: {
|
||||||
|
'logger-sharelatex': { log() {} },
|
||||||
|
'@overleaf/metrics': { timeAsyncMethod() {} }
|
||||||
|
},
|
||||||
|
globals: { Buffer, console, process }
|
||||||
|
})
|
|
@ -26,9 +26,7 @@ describe('ContactManager', function () {
|
||||||
'./mongodb': {
|
'./mongodb': {
|
||||||
db: (this.db = { contacts: {} }),
|
db: (this.db = { contacts: {} }),
|
||||||
ObjectId
|
ObjectId
|
||||||
},
|
}
|
||||||
'logger-sharelatex': { log: sinon.stub() },
|
|
||||||
'@overleaf/metrics': { timeAsyncMethod: sinon.stub() }
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.user_id = ObjectId().toString()
|
this.user_id = ObjectId().toString()
|
||||||
|
|
|
@ -21,8 +21,7 @@ describe('HttpController', function () {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
this.HttpController = SandboxedModule.require(modulePath, {
|
this.HttpController = SandboxedModule.require(modulePath, {
|
||||||
requires: {
|
requires: {
|
||||||
'./ContactManager': (this.ContactManager = {}),
|
'./ContactManager': (this.ContactManager = {})
|
||||||
'logger-sharelatex': (this.logger = { log: sinon.stub() })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.user_id = 'mock-user-id'
|
this.user_id = 'mock-user-id'
|
||||||
|
|
Loading…
Reference in a new issue