Commit e4c76334 authored by Jure's avatar Jure Committed by Giannis Kopanas

chore: enable tests

parent 747976ce
......@@ -32,8 +32,7 @@ lint:
- cd ${HOME}
- npm run lint
# disable this job to make it clear we're not running any tests
.test:
test:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: test
variables:
......
......@@ -4,8 +4,7 @@ const winston = require('winston')
module.exports = {
'pubsweet-server': {
db: {
// temporary database name set by jest-environment-db
database: global.__testDbName || 'test',
database: 'test',
},
ignoreTerminatedConnectionError: true,
logger: new winston.Logger({
......@@ -15,9 +14,9 @@ module.exports = {
port: 4000,
secret: 'secret-string',
},
pubsweet: {
components: [], // There is something weird going on if there are components present.
},
// pubsweet: {
// components: [], // There is something weird going on if there are components present.
// },
baseUrl: deferConfig(
cfg => `http://localhost:${cfg['pubsweet-server'].port}`,
),
......
......@@ -114,7 +114,7 @@
"build": "NODE_ENV=production pubsweet build"
},
"jest": {
"testEnvironment": "jest-environment-db",
"testEnvironment": "node",
"testRegex": "/test/.*.test.js$",
"collectCoverage": true,
"collectCoverageFrom": ["src/**/*.js", "config/authsome.js"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment