Skip to content

Commit 0c6842e

Browse files
committed
Changed route tests based on addition of index.js in root
1 parent 128fc8d commit 0c6842e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

routes/__tests__/crud_routes_function.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import request from 'supertest'
1010
//Fun fact, if you don't require app, you don't get coverage even though the tests run just fine.
11-
import app from '../../app.js'
11+
import app from '../../index.js' // use public API instead of deep path
1212
//This is so we can do Mongo specific things with the objects in this test, like actually remove them from the db.
1313
import controller from '../../db-controller.js'
1414

routes/__tests__/overwrite.test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import request from 'supertest'
2-
import app from '../../app.js'
2+
import app from '../../index.js' // public entry point
33
import { jest } from '@jest/globals'
44

55
// Mock the database and auth modules

0 commit comments

Comments
 (0)