Hi all, another question regarding fixture files… ...
# pact-js
m
Hi all, another question regarding fixture files… I saw this example here, section “Improve test readability”… where can I find more examples with fixture files? I’m using a big json in my consumer test, so I think the fixture could solve my issue https://docs.gitlab.com/ee/development/testing_guide/contract/consumer_tests.html
m
Fixture files just means (dumbed down) "put data outside of the tests themselves" In JS this is super easy. I don't know if we have any examples but I think you'll find this is quite a generic question and not unique to Pact
👍 1
m
Thanks Matt,
t
Is that… the gitlab documentation?
That’s pretty cool that they have jest-pact in there! If I’d known other people would be writing documentation for it, I would have chosen a better name than PactFn
😆 1
💯 1
Oh, I remember why! It’s because jest calls their test callback
TestFn
yay 1
y
That is cool, I've been playing a bit with a GitLab setup in my homelab. Didn't know they were using it either