Skip to content

Bump braces and jest-when - #47

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/multi-f664272a7d
Open

Bump braces and jest-when#47
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/multi-f664272a7d

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 13, 2024

Copy link
Copy Markdown
Contributor

Bumps braces to 3.0.3 and updates ancestor dependency jest-when. These dependencies need to be updated together.

Updates braces from 3.0.2 to 3.0.3

Commits

Updates jest-when from 2.7.2 to 3.6.0

Release notes

Sourced from jest-when's releases.

Support @​golevelup/ts-jest and jest-mock-extended proxies

  • v3.5.1 781bfce
  • Add .tool-versions for asdf 77cd461
  • Merge pull request #93 from mjgp2/issue-89 97b3725
  • fixes timkindberg/jest-when#89 562a35a

timkindberg/jest-when@v3.5.0...v3.5.1

Default Behavior Methods

New methods:

  • defaultReturnValue
  • defaultResolvedValue
  • defaultRejectedValue
  • defaultImplementation

Use them to set up a default behavior, which will serve as fallback if no matcher fits.

when(fn)
  .calledWith('foo').mockReturnValue('special')
  .defaultReturnValue('default') // This line can be placed anywhere, doesn't have to be at the end
expect(fn('foo')).toEqual('special')
expect(fn('bar')).toEqual('default')

Previously you needed to use any of mockReturnValue, mockResolvedValue, mockRejectedValue, or mockImplementation directly on the object before using calledWith to create a default fallback.

// Same as above example
when(fn)
  .mockReturnValue('default')
  .calledWith('foo').mockReturnValue('special')

One neat idea, and the reason I even did this work, is to set up a default implementation that throws an error if an improper call is made to the mock.

when(fn)
  .calledWith(correctArgs)
  .mockReturnValue(expectedValue)
  .defaultImplementation(unsupportedCallError)
// A default implementation that fails your test
function unsupportedCallError(...args) {
throw new Error(Wrong args: ${JSON.stringify(args, null, 2)});
}

Commits:

... (truncated)

Commits
  • 4476ba5 v3.6.0
  • bfac469 Merge pull request #106 from mircohacker/feature/add_full_stacktrace_to_error...
  • 5c227e8 Print full stack trace if verifyAllWhenMocksCalled fails
  • 647c968 Merge pull request #101 from benjaminjkraft/patch-1
  • 0b926b9 Remove a layer of indirection for defaultRejectedValue
  • 3ea3f71 Add files declaration to package.json
  • 767d84b v3.5.2
  • 0864485 Add tests for resolve/reject values without calledWith
  • 2b9858a Merge pull request #98 from 3y3/master
  • d849ccb Fix implementation function context
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [braces](https://github.com/micromatch/braces) to 3.0.3 and updates ancestor dependency [jest-when](https://github.com/timkindberg/jest-when). These dependencies need to be updated together.


Updates `braces` from 3.0.2 to 3.0.3
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

Updates `jest-when` from 2.7.2 to 3.6.0
- [Release notes](https://github.com/timkindberg/jest-when/releases)
- [Commits](timkindberg/jest-when@v2.7.2...v3.6.0)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
- dependency-name: jest-when
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants