Skip to content

Regression when updating from 3.2 to 3.11 #1067

@FrancescoBorzi

Description

@FrancescoBorzi

I'm trying to update my ng-apimock from version 3.2 to the latest (currently 3.11 and I found an annoying regression.

I'm using the Advanced request matchin by specifying a "body" for my requests so I could differenciate different scenarios, for example in my mock definition:

     // MOCK DEFINITION
     "body": {
      "someParam": "SOME_VALUE"
    }

This used to work for all requests having someParam with SOME_VALUE as well as other parameters too.
In other words, this matched with requests such as:

    // Request match: ok with version 3.2, not ok with version 3.11 because of the extra "someOtherParam"
    "body": {
      "someParam": "SOME_VALUE",
      "someOtherParam": "it did not matter what value is here or weather this is even there or not"
    }

so it matched ALL requests having "someParam": "SOME_VALUE",` no matter if there were other params or not.

After upgrading from 3.2 to version 3.11 (I don't know which exact version it introduced this regression) it ONLY matches requests that have ONLY "someParam": "SOME_VALUE", and it does not match if additional params are specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions