Enable test cases for both apps
All checks were successful
Run Tests / test-backend (push) Successful in 40s
Run Tests / test-frontend (push) Successful in 37s

This commit is contained in:
Ichitux
2026-04-01 01:58:43 +02:00
parent b5d1cb12bf
commit 93ec8e6a6c
10 changed files with 6250 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
import { describe, test, expect, beforeEach } from '@jest/globals'
describe('Server', () => {
test('server module can be imported', () => {
// Basic sanity test - just checking the module loads
expect(typeof describe).toBe('function')
})
test('1 + 1 equals 2', () => {
expect(1 + 1).toBe(2)
})
})

6
backend/jest.config.js Normal file
View File

@@ -0,0 +1,6 @@
export default {
testEnvironment: 'node',
transform: {},
moduleFileExtensions: ['js', 'json'],
testMatch: ['**/__tests__/**/*.test.js'],
}

3444
backend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,8 @@
"create-admin": "node create-admin.js",
"migrate": "node migrate.js",
"reset-db": "bash reset-db.sh",
"import-farmacias": "node import-farmacias.js"
"import-farmacias": "node import-farmacias.js",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
},
"keywords": [],
"author": "",
@@ -24,6 +25,9 @@
"bcrypt": "^5.1.1",
"redis": "^4.6.0",
"axios": "^1.6.0"
},
"devDependencies": {
"jest": "^29.7.0"
}
}