mirror of
https://github.com/sasjs/server.git
synced 2026-01-03 05:10:04 +00:00
test: improved tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
preset: 'ts-jest/presets/js-with-ts',
|
||||
testEnvironment: 'node',
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
@@ -9,5 +9,6 @@ module.exports = {
|
||||
statements: -10
|
||||
}
|
||||
},
|
||||
collectCoverageFrom: ['src/**/{!(index),}.ts']
|
||||
collectCoverageFrom: ['src/**/{!(index),}.ts'],
|
||||
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/build/']
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"description": "SASjs server",
|
||||
"main": "./src/server.ts",
|
||||
"scripts": {
|
||||
"start": "nodemon ./src/index.ts",
|
||||
"start": "nodemon ./src/server.ts",
|
||||
"build": "rimraf build && tsc",
|
||||
"semantic-release": "semantic-release -d",
|
||||
"prepare": "[ -d .git ] && git config core.hooksPath ./.git-hooks || true",
|
||||
@@ -38,5 +38,8 @@
|
||||
"ts-jest": "^27.0.3",
|
||||
"ts-node": "^10.0.0",
|
||||
"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'
|
||||
|
||||
const port = 5000
|
||||
app.listen(port, () => {
|
||||
const listener = app.listen(port, () => {
|
||||
console.log(`⚡️[server]: Server is running at http://localhost:${port}`)
|
||||
})
|
||||
|
||||
@@ -6,3 +6,5 @@ export const getTmpFolderPath = () =>
|
||||
|
||||
export const getTmpFilesFolderPath = () =>
|
||||
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": "./",
|
||||
"outDir": "./build",
|
||||
"esModuleInterop": true,
|
||||
"strict": true
|
||||
"strict": true,
|
||||
"resolveJsonModule": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user