mirror of
https://github.com/sasjs/server.git
synced 2026-01-16 10:20:05 +00:00
test: improved tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
preset: 'ts-jest',
|
preset: 'ts-jest/presets/js-with-ts',
|
||||||
testEnvironment: 'node',
|
testEnvironment: 'node',
|
||||||
coverageThreshold: {
|
coverageThreshold: {
|
||||||
global: {
|
global: {
|
||||||
@@ -9,5 +9,6 @@ module.exports = {
|
|||||||
statements: -10
|
statements: -10
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
collectCoverageFrom: ['src/**/{!(index),}.ts']
|
collectCoverageFrom: ['src/**/{!(index),}.ts'],
|
||||||
|
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/build/']
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"description": "SASjs server",
|
"description": "SASjs server",
|
||||||
"main": "./src/server.ts",
|
"main": "./src/server.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "nodemon ./src/index.ts",
|
"start": "nodemon ./src/server.ts",
|
||||||
"build": "rimraf build && tsc",
|
"build": "rimraf build && tsc",
|
||||||
"semantic-release": "semantic-release -d",
|
"semantic-release": "semantic-release -d",
|
||||||
"prepare": "[ -d .git ] && git config core.hooksPath ./.git-hooks || true",
|
"prepare": "[ -d .git ] && git config core.hooksPath ./.git-hooks || true",
|
||||||
@@ -38,5 +38,8 @@
|
|||||||
"ts-jest": "^27.0.3",
|
"ts-jest": "^27.0.3",
|
||||||
"ts-node": "^10.0.0",
|
"ts-node": "^10.0.0",
|
||||||
"typescript": "^4.3.2"
|
"typescript": "^4.3.2"
|
||||||
|
},
|
||||||
|
"configuration": {
|
||||||
|
"sasPath": "C:\\Program Files\\SASHome\\SASFoundation\\9.4\\sas.exe"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
0
src/controllers/spec/deploy.spec.ts
Normal file
0
src/controllers/spec/deploy.spec.ts
Normal file
@@ -1,6 +1,6 @@
|
|||||||
import app from './app'
|
import app from './app'
|
||||||
|
|
||||||
const port = 5000
|
const port = 5000
|
||||||
app.listen(port, () => {
|
const listener = app.listen(port, () => {
|
||||||
console.log(`⚡️[server]: Server is running at http://localhost:${port}`)
|
console.log(`⚡️[server]: Server is running at http://localhost:${port}`)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,3 +6,5 @@ export const getTmpFolderPath = () =>
|
|||||||
|
|
||||||
export const getTmpFilesFolderPath = () =>
|
export const getTmpFilesFolderPath = () =>
|
||||||
path.join(getTmpFolderPath(), 'files')
|
path.join(getTmpFolderPath(), 'files')
|
||||||
|
|
||||||
|
export const getTmpLogFolderPath = () => path.join(getTmpFolderPath(), 'log')
|
||||||
|
|||||||
1
src/utils/index.ts
Normal file
1
src/utils/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from './file'
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
"rootDir": "./",
|
"rootDir": "./",
|
||||||
"outDir": "./build",
|
"outDir": "./build",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"strict": true
|
"strict": true,
|
||||||
|
"resolveJsonModule": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user