Skip to content

What should I do with my first test? #831

Answered by mefellows
danielmoessner asked this question in Q&A
Discussion options

You must be logged in to vote

Do I have to add more tests in (X), so that my frontend will actually get tested? I'm using vue3, so for example would it be more useful to check that my view component mounts and renders the verticals? And is that how pact is intended to be used on the consumer side?

The way I like to think about writing a Pact test, is that I'm going to write a unit test of my API client. It just so happens, that by using Pact it will capture a contract I can use to later verify that the mocks were correct. i.e. the mocks are validated.

So, asserting that my API client received an HTTP 200 is not very useful (because Pact will do that for you). What is important to check, is that your API client did t…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@danielmoessner
Comment options

@TimothyJones
Comment options

Comment options

You must be logged in to vote
3 replies
@danielmoessner
Comment options

@mefellows
Comment options

@bethesque
Comment options

Answer selected by danielmoessner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants