Skip to content

Commit 1578ba5

Browse files
authored
Merge pull request #1 from tukue/featuresimpleapp
refactoring unit test with sqlite db and trivy image scanner
2 parents 22039f3 + a6ec5eb commit 1578ba5

File tree

15 files changed

+480
-135
lines changed

15 files changed

+480
-135
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
npm-debug.log
3+
.git
4+
.gitignore
5+
.env
6+
*.md
7+
data/*.db

.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Application settings
2+
PORT=2019
3+
4+
# Database settings
5+
SQLITE_DB_PATH=data/items.db
6+
7+
# Redis settings (legacy)
8+
# REDIS_HOST=localhost
9+
# REDIS_PORT=6379
10+
# REDIS_PASSWORD=

.github/workflows/node.js.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
16-
1715
strategy:
1816
matrix:
1917
node-version: [18.x, 20.x, 22.x]

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.env
2-
node_modules
2+
node_modules
3+
simple-app/values.yaml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This is a simple application that uses SQLite3 as the main database.
1010
- Docker
1111
- Minikube
1212
- Kubernetes CLI (`kubectl`)
13-
- Helm
13+
- Helm
1414

1515
### Installation
1616

data/items.db

8 KB
Binary file not shown.

jest.config.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// jest.config.js
22
module.exports = {
3-
testEnvironment: 'node',
4-
testMatch: ['**/tests/**/*.test.js'],
5-
testPathIgnorePatterns: ['/node_modules/', '/src/routes/'],
6-
moduleDirectories: ['node_modules', 'src'],
7-
verbose: true,
8-
testTimeout: 10000,
9-
setupFiles: ['dotenv/config']
10-
};
11-
3+
testEnvironment: 'node',
4+
testMatch: ['**/tests/**/*.test.js'],
5+
testPathIgnorePatterns: ['/node_modules/', '/src/routes/', '/data/*.db-journal'],
6+
moduleDirectories: ['node_modules', 'src'],
7+
verbose: true,
8+
testTimeout: 10000,
9+
setupFiles: ['dotenv/config']
10+
};

0 commit comments

Comments
 (0)