<#1220 Vitest - Pact Verifier fails with 3 or more...
# pact-js-development
g
#1220 Vitest - Pact Verifier fails with 3 or more interactions Issue created by shishkin Software versions • OS: Mac OSX 14.5 • Consumer Pact library: Pact JS v12.5.2 • Provider Pact library: Pact JS v12.5.2 • Node Version: Node v20.11.1 Issue Checklist Please confirm the following: ☑︎ I have upgraded to the latest ☑︎ I have the read the FAQs in the Readme ☑︎ I have triple checked, that there are no unhandled promises in my code and have read the section on intermittent test failures ☑︎ I have set my log level to debug and attached a log file showing the complete request/response cycle ☑︎ For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem Expected behaviour It should either work or explain clearly what user did wrong. Actual behaviour I'm running provider tests and as long as I get 3 or more interactions in the pact file, subsequent interactions start failing due to state change handlers. Weirdly, it fails when I duplicate/copy paste interactions in the pact file, so the same interaction that just succeeded will now fail. Steps to reproduce 1. Create an interaction and see it succeed. 2. Duplicate it twice and see the last one fail. 3. Move interactions in the file around and see a different one of the same interactions fail. See test and pact JSON. Relevant log files See log. pact-foundation/pact-js