Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Табличные тесты для ручек create, get api и service слоев с моками для service, repo слоёв #6

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

xeeetu
Copy link
Owner

@xeeetu xeeetu commented Sep 13, 2024

No description provided.

@xeeetu xeeetu changed the title Табличные тесты для ручек create, get api слоя с моками для service слоя Табличные тесты для ручек create, get api и service слоев с моками для service, repo слоёв Sep 14, 2024

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
noteServiceMock := tt.noteServiceMockFunc(mc)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для распаррелливания тестов можно использовать t.Parallel()

package repository

//go:generate sh -c "rm -rf mocks && mkdir -p mocks"
//go:generate minimock -i NoteRepository -o ./mocks/ -s "_minimock.go"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

уноси все в мейкфайл

)

func TestCreate(t *testing.T) {
//t.Parallel()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это че за хуйня

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants