From 8d85a8186d1c960af780bc039bbf4793dc389e0d Mon Sep 17 00:00:00 2001 From: Matt Fellows Date: Fri, 2 Dec 2022 11:39:40 +1100 Subject: [PATCH] fix: pactffi_create_mock_server_for_transport returns uint32 --- native/consumer.cc | 2 +- test/consumer.integration.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/native/consumer.cc b/native/consumer.cc index de4cd4f8..a59bc953 100644 --- a/native/consumer.cc +++ b/native/consumer.cc @@ -309,7 +309,7 @@ Napi::Value PactffiCreateMockServerForTransport(const Napi::CallbackInfo& info) std::string transport = info[3].As().Utf8Value(); std::string config = info[4].As().Utf8Value(); - uint16_t result = pactffi_create_mock_server_for_transport(pact, addr.c_str(), port, transport.c_str(), config.c_str()); + uint32_t result = pactffi_create_mock_server_for_transport(pact, addr.c_str(), port, transport.c_str(), config.c_str()); return Number::New(env, result); } diff --git a/test/consumer.integration.spec.ts b/test/consumer.integration.spec.ts index 3b145e13..833bafb8 100644 --- a/test/consumer.integration.spec.ts +++ b/test/consumer.integration.spec.ts @@ -140,7 +140,7 @@ describe('FFI integration test for the HTTP Consumer API', () => { const requestMismatches = mismatches[0] as MatchingResultRequestMismatch; - expect(mismatches[0].type).to.equal('request-mismatch'); + expect(requestMismatches.type).to.equal('request-mismatch'); expect(requestMismatches.method).to.equal('POST'); expect(requestMismatches.path).to.equal('/dogs/1234'); expect(requestMismatches.mismatches).to.deep.include({