File tree 2 files changed +8
-36
lines changed 2 files changed +8
-36
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export const membershipRepositoryTestCase = () => {
16
16
let allPeriods : Array < object > [ ] ;
17
17
18
18
beforeAll ( async ( ) => {
19
+ process . env . MONGO_CONNECTION_STRING = "dummy" ;
19
20
allMemberships = loadTestJson ( __dirname , 'allMemberships.json' ) ;
20
21
allPeriods = loadTestJson ( __dirname , 'allMembershipsPeriods.json' ) ;
21
22
@@ -43,12 +44,16 @@ export const membershipRepositoryTestCase = () => {
43
44
44
45
it ( 'Should get all memberships' , async ( ) => {
45
46
const allExistingMemberships = await membershipRepository . getAllMemberships ( ) ;
47
+
48
+ expect ( allExistingMemberships . length ) . toBeGreaterThan ( 0 ) ;
49
+ } ) ;
50
+
51
+ it ( 'Should return all memberships with valid schema structure' , async ( ) => {
52
+ const allExistingMemberships = await membershipRepository . getAllMemberships ( ) ;
46
53
const expectedShape = membershipSchema ;
47
54
48
55
allExistingMemberships . forEach ( membership => {
49
56
expect ( membership ) . toEqual ( expect . objectContaining ( expectedShape ) ) ;
50
57
} ) ;
51
-
52
- } ) ;
53
-
58
+ } ) ;
54
59
} ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments