Joe
03/15/2024, 10:12 PMPactV3
I am seeing this warning:
WARN ThreadId(01) pact_models::pact: Note: Existing pact is an older specification version (V3), and will be upgraded
Followed by these trace logs:
TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact before - ref = 2, inner = RefCell { value: PactHandleInner { pact: V4Pact
Notice the V4Pact
👆
Why is that V4
seems to be involved when I specifically setup with V3
?Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Joe
03/18/2024, 3:20 PMimport { PactV3 } from '@pact-foundation/pact';
const provider = new PactV3({
consumer: 'some-client',
provider: 'some-provider',
logLevel: 'trace',
});
describe('pact test', () => {
const provider = getProvider();
beforeEach(() => {
const interaction = {
state: 'I have stuff',
uponReceiving: 'a request for stuff',
withRequest: {
...
},
willRespondWith: {
...
},
};
provider.addInteraction(interaction);
});
test('expected body', async () => {
return provider.executeTest(async mockserver => {
...
});
});
});
With these versions:
"node_modules/@pact-foundation/pact": {
"version": "12.3.0",
"dependencies": {
"@pact-foundation/pact-core": "^14.3.0",
Matt (pactflow.io / pact-js / pact-go)
Joe
03/19/2024, 3:31 PM"metadata": {
"pact-js": {
"version": "12.3.0"
},
"pactRust": {
"ffi": "0.4.16",
"models": "1.1.19"
},
"pactSpecification": {
"version": "3.0.0"
}
},