- Upgraded to use jest + babel instead of ts-jest

This commit is contained in:
Ferdi Koomen 2019-11-06 17:05:20 +01:00
parent d026426331
commit c4bc1e1787
8 changed files with 784 additions and 146 deletions

6
.babelrc.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-typescript'
]
};

View File

@ -1,17 +1,4 @@
module.exports = {
testRegex: '\\.spec\\.tsx?$',
testEnvironment: 'node',
transform: {
'\\.tsx?$': 'ts-jest'
},
globals: {
'ts-jest': {
compiler: 'typescript',
tsConfig: {
declaration: false,
declarationMap: false,
sourceMap: false
}
}
}
testRegex: '\\.spec\\.ts$',
testEnvironment: 'node'
};

View File

@ -57,6 +57,9 @@
"prettier:fix": "prettier \"./src/**/*.ts\" --write"
},
"devDependencies": {
"@babel/core": "7.7.0",
"@babel/preset-env": "7.7.1",
"@babel/preset-typescript": "7.7.0",
"@types/jest": "24.0.22",
"@types/js-yaml": "3.12.1",
"@types/mkdirp": "0.5.2",
@ -79,7 +82,6 @@
"path": "0.12.7",
"prettier": "1.18.2",
"rimraf": "3.0.0",
"ts-jest": "24.1.0",
"typescript": "3.7.2",
"yup": "0.27.0"
}

View File

@ -1,4 +1,4 @@
import * as camelcase from 'camelcase';
import camelCase from 'camelcase';
/**
* Convert the input value to a correct service classname. This converts
@ -6,7 +6,7 @@ import * as camelcase from 'camelcase';
* @param value
*/
export function getServiceClassName(value: string): string {
const name = camelcase(value, { pascalCase: true });
const name = camelCase(value, { pascalCase: true });
if (name && !name.endsWith('Service')) {
return `${name}Service`;
}

View File

@ -1,4 +1,4 @@
import * as camelcase from 'camelcase';
import camelCase from 'camelcase';
/**
* Convert the input value to a correct operation (method) classname. This converts
@ -7,5 +7,5 @@ import * as camelcase from 'camelcase';
* @param value
*/
export function getServiceOperationName(value: string): string {
return camelcase(value);
return camelCase(value);
}

View File

@ -1,4 +1,4 @@
import * as camelcase from 'camelcase';
import camelCase from 'camelcase';
/**
* Convert the input value to a correct service classname. This converts
@ -6,7 +6,7 @@ import * as camelcase from 'camelcase';
* @param value
*/
export function getServiceClassName(value: string): string {
const name = camelcase(value, { pascalCase: true });
const name = camelCase(value, { pascalCase: true });
if (name && !name.endsWith('Service')) {
return `${name}Service`;
}

View File

@ -1,4 +1,4 @@
import * as camelcase from 'camelcase';
import camelCase from 'camelcase';
/**
* Convert the input value to a correct operation (method) classname. This converts
@ -7,5 +7,5 @@ import * as camelcase from 'camelcase';
* @param value
*/
export function getServiceOperationName(value: string): string {
return camelcase(value);
return camelCase(value);
}

887
yarn.lock

File diff suppressed because it is too large Load Diff