Remember to wrap the synctest in a run for the name of the thing
This commit is contained in:
@@ -47,7 +47,7 @@ func TestCreateNote(t *testing.T) {
|
|||||||
}
|
}
|
||||||
repo := repository.NewNoteRepository(&mockNoteStore{})
|
repo := repository.NewNoteRepository(&mockNoteStore{})
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
synctest.Test(t, func(t *testing.T) {
|
synctest.Test(t, func(t *testing.T) {
|
||||||
note, err := repo.CreateNote(tc.content)
|
note, err := repo.CreateNote(tc.content)
|
||||||
if tc.expectedError {
|
if tc.expectedError {
|
||||||
@@ -70,6 +70,7 @@ func TestCreateNote(t *testing.T) {
|
|||||||
}
|
}
|
||||||
fmt.Printf("Test case '%s' passed.\n", tc.name)
|
fmt.Printf("Test case '%s' passed.\n", tc.name)
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user