Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@
"sourceType": "module",
"project": "tsconfig.json"
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended"
],
"env": {
"node": true
"node": true,
"jest/globals": true
},
"plugins": ["jest", "@typescript-eslint"],
"rules": {
//'no-console': 'off',
//'import/prefer-default-export': 'off',
//'@typescript-eslint/no-unused-vars': 'warn',
//"no-console": "off",
//"import/prefer-default-export": "off",
//"@typescript-eslint/no-unused-vars": "warn"
"jest/no-conditional-expect": "off"
},
"ignorePatterns": ["dist"]
"ignorePatterns": ["dist", "jest.config.js"]

}
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ jobs:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build:prod --if-present
- name: Start server and test server response
- name: Start server
run: |
npm start &
sleep 5 # Wait for server to start
curl localhost:80
if [ -n "$(jobs -p)" ]; then
kill $(jobs -p) # Kill background jobs
fi
sleep 5 # Give server some time to start
- run: npm test
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
name: "CodeQL"

on:
workflow_dispatch:
push:
branches: [ "dev" ]
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ftp.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Deploy via ftp
on:
workflow_dispatch:
push:
branches: [ "main" ]
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/njsscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
name: njsscan sarif

on:
workflow_dispatch:
push:
branches: [ "dev" ]
pull_request:
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"workbench.editor.enablePreview": false,
"editor.rename.enablePreview": false
}
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
modulePathIgnorePatterns: ['<rootDir>/dist/'],
moduleNameMapper: {
'^@src/(.*)$': '<rootDir>/src/$1',
},
};
Loading