File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,11 @@ name: Frontend and Backend testing
2
2
3
3
on :
4
4
pull_request :
5
- branches : [ devDocker_v2 ]
5
+ branches : [ dev ]
6
6
7
7
jobs :
8
8
frontend_testing :
9
9
runs-on : ubuntu-latest
10
- continue-on-error : true
11
10
steps :
12
11
- uses : actions/checkout@v2
13
12
- uses : actions/setup-node@v1
@@ -19,13 +18,12 @@ jobs:
19
18
20
19
backend_testing :
21
20
runs-on : ubuntu-latest
22
- continue-on-error : true
21
+ timeout-minutes : 7
23
22
steps :
24
23
- uses : actions/checkout@v2
25
24
- uses : actions/setup-node@v1
26
25
with :
27
26
node-version : 18.17.1
28
27
- run : npm ci
29
28
- 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
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const dockerHelper = require('../chronos_npm_package/controllers/dockerHelper');
9
9
10
10
require ( 'dotenv' ) . config ( ) ;
11
11
12
- const db = process . env . DB_URI ;
12
+ const db = 'mongodb+srv://Ok:[email protected] /?retryWrites=true&w=majority' ;
13
13
14
14
beforeAll ( async ( ) => {
15
15
await connectDB ( ) ;
@@ -77,10 +77,10 @@ describe('mongo.connect', () => {
77
77
test ( 'should connect to MongoDB database' , async ( ) => {
78
78
await mongo . connect ( { database : { URI : db } } ) ;
79
79
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
+ // );
84
84
} ) ;
85
85
86
86
test ( 'should handle connection errors' , async ( ) => {
You can’t perform that action at this time.
0 commit comments