Browse Source

Jest config and tsconfig fixes (#835)

pull/1/head
Alexandr Velikiy 4 years ago committed by GitHub
parent
commit
e53909d833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      server/Dockerfile
  2. 6
      server/jest.config.js
  3. 3
      server/src/config.ts

4
server/Dockerfile

@ -4,7 +4,7 @@ FROM node:8-alpine AS build
RUN apk add --no-cache curl gnupg make g++ bash python
# Note: context starts in directory above (see docker-compose file)
# Note: context starts in the directory above (see docker-compose file)
COPY server /var/www/server
WORKDIR /var/www/server
@ -14,7 +14,7 @@ RUN npm run build
FROM node:8-alpine
# Note: context starts in directory above (see docker-compose file)
# Note: context starts in the directory above (see docker-compose file)
COPY server/package.json /var/www/server/
WORKDIR /var/www/server

6
server/jest.config.js

@ -5,9 +5,9 @@ module.exports = {
"useBabelrc": true,
"tsConfigFile": "tsconfig.jest.json"
},
"GIT_VERSION": "test_version",
"GIT_COMMITHASH": "test_commit_hash",
"GIT_BRANCH": "test_branch"
"GIT_VERSION": "version",
"GIT_COMMITHASH": "commit_hash",
"GIT_BRANCH": "branch"
},
"transform": {
"\\.ts": "ts-jest"

3
server/src/config.ts

@ -8,7 +8,8 @@ import * as path from 'path';
import * as fs from 'fs';
import * as os from 'os';
// GIT_BRANCH, GIT_COMMITHASH, GIT_VERSION variables are defined by webpack
// TypeScript doesn't know that these variables exist
declare const GIT_BRANCH: string;
declare const GIT_COMMITHASH: string;
declare const GIT_VERSION: string;

Loading…
Cancel
Save