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

[Snyk] Upgrade chai-spies from 1.0.0 to 1.1.0 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nejidevelops
Copy link
Owner

This PR was automatically created by Snyk using the credentials of a real user.


![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)

Snyk has created this PR to upgrade chai-spies from 1.0.0 to 1.1.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 1 version ahead of your current version.

  • The recommended version was released on 7 months ago.

Release notes
Package name: chai-spies
  • 1.1.0 - 2023-10-31

    What's Changed

    New Contributors

    Full Changelog: 1.0.0...v1.1.0

  • 1.0.0 - 2018-01-12

    This is a major release which introduces many new featues, such as sandboxes, as well as new convenience methods and assertions.

    This major release also comes with some breaking changes:

    Breaking Changes

    • removed reset method. #35 (@ stalniy)
      You will need to update any callsites to spy.reset() to instead assign a new spy to that variable or property.

    • exposes original function body in spy.toString calls #93 (@ stalniy)
      If you check the spy.toString() output in your tests, this will need to be changed to accomodate for this change.

    Features

    chai.spy.on(array, 'push', returns => 5)
    chai.spy.on(array, 'push', function() {
      // custom implementation
    })
    • added spy.restore #61 (#38, @ stalniy)
      Allows to remove spies added by spy.on and restore original method implementation

    • added support for sanboxes #61 (#38, @ stalniy)
      Now it's possible to create sanboxes and track/restore spies in sandbox

    • added support for nth call checks #75 (#59, @ cnexans)
      Allows to check spy arguments on specified call

    const spy = chai.spy()

    spy(1); // first call
    spy(2); // second call
    spy(3); // third call
    spy(i); // nth call

    expect(spy).to.have.been.first.called.with(1)
    expect(spy).to.have.been.second.called.with(2)
    expect(spy).to.have.been.third.called.with(3)
    expect(spy).on.nth(i).be.called.with(i)

    Bug Fixes

    Documentation

from chai-spies GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade chai-spies from 1.0.0 to 1.1.0.

See this package in npm:
chai-spies

See this project in Snyk:
https://app.snyk.io/org/newtonombese1/project/6ca6ee5f-5d63-46e3-a656-0943713f35b6?utm_source=github&utm_medium=referral&page=upgrade-pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants