diff --git a/plugins/woocommerce/changelog/api-minor-fixes-for-api-daily-flakiness b/plugins/woocommerce/changelog/api-minor-fixes-for-api-daily-flakiness new file mode 100644 index 00000000000..12666be9d4d --- /dev/null +++ b/plugins/woocommerce/changelog/api-minor-fixes-for-api-daily-flakiness @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +A few fixes for API daily test flakiness diff --git a/plugins/woocommerce/tests/api-core-tests/tests/shipping/shipping-zones.test.js b/plugins/woocommerce/tests/api-core-tests/tests/shipping/shipping-zones.test.js index 33ce97ed23a..87769591c78 100644 --- a/plugins/woocommerce/tests/api-core-tests/tests/shipping/shipping-zones.test.js +++ b/plugins/woocommerce/tests/api-core-tests/tests/shipping/shipping-zones.test.js @@ -171,7 +171,8 @@ test.describe.serial( 'Shipping zones API tests', () => { const putResponseStateOnlyJSON = await putResponseStateOnly.json(); await expect( putResponseStateOnly.status() ).toEqual( 200 ); - await expect( putResponseStateOnlyJSON ).toHaveLength(0); + // running on external hosts, this can be 0 or 1 + expect([0, 1]).toContain(putResponseStateOnlyJSON.length); } );