Skip to content

Commit 488f396

Browse files
committed
Merge branch 'Edwin/CI-CD' of https://github.com/HEET-Group/Chronos into Edwin/CI-CD
2 parents 18b7557 + 09a3596 commit 488f396

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/integrate.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
jobs:
88
frontend_testing:
99
runs-on: ubuntu-latest
10-
continue-on-error: true
1110
steps:
1211
- uses: actions/checkout@v2
1312
- uses: actions/setup-node@v1
@@ -19,13 +18,12 @@ jobs:
1918

2019
backend_testing:
2120
runs-on: ubuntu-latest
22-
continue-on-error: true
21+
timeout-minutes: 7
2322
steps:
2423
- uses: actions/checkout@v2
2524
- uses: actions/setup-node@v1
2625
with:
2726
node-version: 18.17.1
2827
- run: npm ci
2928
- run: npm run build
30-
- run: npx jest --__config backend-tests__/jest.config.js --verbose
31-
working-directory: __backend-tests__
29+
- run: npx jest --config __backend-tests__/jest.config.js --verbose

__backend-tests__/mongo.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const dockerHelper = require('../chronos_npm_package/controllers/dockerHelper');
99

1010
require('dotenv').config();
1111

12-
const db = process.env.DB_URI;
12+
const db = 'mongodb+srv://Ok:[email protected]/?retryWrites=true&w=majority';
1313

1414
beforeAll(async () => {
1515
await connectDB();
@@ -77,10 +77,10 @@ describe('mongo.connect', () => {
7777
test('should connect to MongoDB database', async () => {
7878
await mongo.connect({ database: { URI: db } });
7979

80-
//expect(mongoose.connect).toHaveBeenCalledWith(db);
81-
expect(console.log).toHaveBeenCalledWith(
82-
expect.stringContaining('MongoDB database connected at')
83-
);
80+
expect(mongoose.connect).toHaveBeenCalledWith(db);
81+
// expect(console.log).toHaveBeenCalledWith(
82+
// expect.stringContaining('MongoDB database connected at')
83+
// );
8484
});
8585

8686
test('should handle connection errors', async () => {

0 commit comments

Comments
 (0)