Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sinon] allow partial arguments for calledWith #53467

Conversation

Flarna
Copy link
Contributor

@Flarna Flarna commented May 28, 2021

Allow partial arguments for calledWith, alwaysCalledWith and neverCalledWith as this is a valid usecase.

Only the xxxExactly asserts verify all arguments.

Allow partial arguments for calledWith, alwaysCalledWith and neverCalledWith as this is a valid usecase.
@typescript-bot
Copy link
Contributor

typescript-bot commented May 28, 2021

@Flarna Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes in this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 53467,
  "author": "Flarna",
  "headCommitOid": "918aa7aa62b1a8cf01b20784ee69162a84b8fc19",
  "lastPushDate": "2021-05-28T09:24:24.000Z",
  "lastActivityDate": "2021-06-02T05:45:21.000Z",
  "maintainerBlessed": "Waiting for Code Reviews",
  "mergeOfferDate": "2021-06-01T21:29:33.000Z",
  "mergeRequestDate": "2021-06-02T05:45:21.000Z",
  "mergeRequestUser": "Flarna",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "sinon",
      "kind": "edit",
      "files": [
        {
          "path": "types/sinon/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/sinon/sinon-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "mrbigdog2u",
        "lumaxis",
        "nicojs",
        "43081j",
        "joshuakgoldberg",
        "gjednaszewski",
        "johnjesse",
        "alecf",
        "SimonSchick"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "43081j",
      "date": "2021-05-28T21:46:53.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 850284055,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

🔔 @MrBigDog2U @lumaxis @nicojs @43081j @JoshuaKGoldberg @gjednaszewski @johnjesse @alecf @SimonSchick — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 28, 2021
@typescript-bot typescript-bot added the Self Merge This PR can now be self-merged by the PR author or an owner label Jun 1, 2021
@Flarna
Copy link
Contributor Author

Flarna commented Jun 2, 2021

Ready to merge

@typescript-bot typescript-bot merged commit c532dc4 into DefinitelyTyped:master Jun 2, 2021
@Flarna Flarna deleted the sinon-assert-with-partial branch June 2, 2021 05:47
@typescript-bot
Copy link
Contributor

I just published @types/sinon@10.0.2 to npm.

@woutervanvliet
Copy link

@Flarna @43081j Do you have any particular reason why many of the other methods in the "calledWith" family (for example calledWithMatch) haven't gotten the "partial" treatment?

@Flarna
Copy link
Contributor Author

Flarna commented Jun 16, 2021

Most likely because I don't use them in my code therefore I haven't noticed it. My PR was triggered by an issues in one of my projects, not by reviewing the whole API.

@woutervanvliet
Copy link

Thanks - that's what I needed to know. When I have a moment to spare I'll look into submitting a PR on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants