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

How to mock a builder pattern #225

Open
atlanteh opened this issue Apr 4, 2022 · 0 comments
Open

How to mock a builder pattern #225

atlanteh opened this issue Apr 4, 2022 · 0 comments

Comments

@atlanteh
Copy link

atlanteh commented Apr 4, 2022

let's say I have a builder class as following:

function dbAccess(query) {
  // do some stuff
  query.withPagination(somePagination).withOffset(someOffset).execute()
 // do some other stuff
}

I want to test dbAccess and verify that query was called with specific params.
How do I do this?

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

No branches or pull requests

1 participant