<#447 Binary Content Matching is odd - cross platf...
# pact-js-development
g
#447 Binary Content Matching is odd - cross platform/arch Issue created by YOU54F Smells Cross CI provider and cross arch has shown a few inconsistencies in content-type matching, which is clearly demonstrable here. Haven't thought of a solution just yet, but this at least highlights and allows us to test more combinations than before Encountered in #444 (comment) If you have code that looks like this, there is a definite code-smell pact-js-core/test/consumer.integration.spec.ts Lines 23 to 34 in </pact-foundation/pact-js-core/commit/facfef810036d0b80fb3c2fbcafd8efa255b6171|facfef8> The condition is used in these tests pact-js-core/test/consumer.integration.spec.ts Lines 77 to 87 in </pact-foundation/pact-js-core/commit/dac0e46eafc5cdf633f459adc591e9cc5ba26c24|dac0e46> pact-js-core/test/message.integration.spec.ts Lines 94 to 109 in </pact-foundation/pact-js-core/commit/dac0e46eafc5cdf633f459adc591e9cc5ba26c24|dac0e46>
See pact-foundation/pact-reference#171 for why we have an OS switch here
Windows: does not have magic mime matcher, uses content-type
OSX on CI: does not magic mime matcher, uses content-type
OSX: has magic mime matcher, sniffs content
Linux: has magic mime matcher, sniffs content
So based on our compat table of ✅ = supported ❌ = not supported We have a few different ways we can test to cover different arch combinations • Locally • Locally with GitHub Actions / Act • GitHub Actions • Locally with Cirrus CLI • Cirrus CI ❓ = needs test evidence ❌ = not supported, or untestable on platform pact-foundation/pact-js-core