Skip to content

chore(deps): update dependency chai to v3 #31558

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

Merged
merged 12 commits into from
May 8, 2025
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 21, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
chai (source) 1.10.0 -> 3.5.0 age adoption passing confidence

Release Notes

chaijs/chai (chai)

v3.5.0: / 2016-01-28

Compare Source

For assert fans: you now have assert.includeDeepMembers() which matches expect().to.include.deep.members() and .should.include.deep.members()!

This release also includes a variety of small bugfixes and documentation fixes. Most notably, we are now governed by a Code Of Conduct - which gives Chai contributors (including those who files issues, work on code, or documentation, or even just hang out on our Slack & Gitter channels) safety from harassment and discrimination.

Full changes below:

Community Contributions
Documentation fixes

v3.4.1: / 2015-11-07

Compare Source

This is a small documentation bug fix release - it just fixes a couple of issues with the documentation.

Community Contributions
Documentation fixes

v3.4.0: / 2015-10-21

Compare Source

This release improves some confusing error messages, and adds some new assertions. Key points:

  • Feature: New assertion: expect(1).oneOf([1,2,3]) - for asserting that a given value is one of a set.
  • Feature: .include() (and variants) will now give better error messages for bad object types. Before expect(undefined).to.include(1) would say "expected undefined to include 1", now says "object tested must be an array, an object, or a string but undefined given"
  • Feature: .throw() (and variants) can now better determine the Error types, for example expect(foo).to.throw(node_assert.AssertionError) now works.
  • Feature: .closeTo is now aliased as .approximately
  • BugFix: .empty changes from 3.3.0 have been reverted, as they caused breaking changes to arrays which manually set keys.
Community Contributions
Code Features & Fixes
Documentation fixes

v3.3.0: / 2015-09-08

Compare Source

This release adds some new assertions and fixes some quite important, long standing bugs. Here are the cliff notes:

  • Bugfix: Property assertions that fail now show a stack trace!
  • Bugfix: If you've used the frozen, sealed or extensible assertions to test primitives (e.g. expect(1).to.be.frozen), you may have noticed that in older browsers (ES5) these fail, and in new ones (ES6) they pass. They have now been fixed to consistently pass
  • The assert interface has been given the following new methods, to align better with other interfaces:, assert.isAtMost, assert.isAtLeast, assert.isNotTrue, assert.isNotFalse.
Community Contributions
Code Features & Fixes
Documentation fixes

v3.2.0: / 2015-07-19

Compare Source

This release fixes a bug with the previous additions in 3.1.0. assert.frozen/expect().to.be.frozen/.should.be.frozen all accidentally called Object.isSealed() instead. Now they correctly call Object.isFrozen().

If you're using these features, please upgrade immediately.

It also adds aliases for a lot of assert methods:

  • expect/should..respondTo: respondsTo
  • expect/should..satisfy: satisfies
  • assert.ok: assert.isOk
  • assert.notOk: assert.isNotOk
  • assert.extensible: assert.isExtensible
  • assert.notExtensible: assert.isNotExtensible
  • assert.sealed: assert.isSealed
  • assert.notSealed: assert.isNotSealed
  • assert.frozen: assert.isFrozen
  • assert.notFrozen: assert.isNotFrozen
Community Contributions
Code Features & Fixes

v3.1.0: / 2015-07-16

Compare Source

This release adds assertions for extensibility/freezing/sealing on objects:

assert.extensible({});
assert.notExtensible(Object.preventExtensions({}));
expect(Object.preventExtensions({})).to.not.be.extensible;
Object.preventExtensions({}).should.not.be.extensible;

assert.notSealed({});
assert.sealed(Object.seal({}));
expect(Object.seal({})).to.be.sealed;
Object.seal({}).should.be.sealed;

assert.notFrozen({});
assert.frozen(Object.freeze({}));
expect(Object.freeze({})).to.be.frozen;
Object.freeze({}).should.be.frozen;

It also adds assertions for checking if a number is NaN:

assert.isNaN(NaN);
assert.isNotNaN(5);
expect(NaN).to.be.NaN;
expect(5).to.not.be.NaN;
NaN.should.be.NaN;
5.should.not.be.NaN;
Community Contributions
Code Features & Fixes

v3.0.0: / 2015-06-04

Compare Source

This release contains some small breaking changes. Most people are unlikely to
notice them - but here are the breaking changes:

  • Switched from "Component" builds to "Browserify" builds for Browsers. If
    you're using RequireJS with Chai, you might notice a change (chai used to
    be a global, now it won't be - instead you'll have to require it).
  • .has.property('foo', undefined) will now specifically test to make sure
    that the value 'foo' is actually undefined - before it simply tested that
    the key existed (but could have a value).
  • .to.be.a('type') has changed to support more types, including ES6 types
    such as 'promise', 'symbol', 'float32array' etc, this also means using
    ES6's Symbol.toStringTag affects the behaviour .to.be.a(). In addition to
    this, Errors have the type of 'error'.
  • assert.ifError() now follows Node's assert.ifError() behaviour - in other
    words, if the first argument is truthy, it'll throw it.
  • ReleaseNotes.md is no longer maintained, see the Github Releases Page instead.
  • History.md is no longer maintained, see the Github Commit Log instead.
Community Contributions
Code Features & Fixes
Documentation fixes

v2.3.0

Compare Source

==================

  • Merge pull request #​423 from ehntoo/patch-1
  • Merge pull request #​422 from ljharb/fix_descriptor_tests
  • Fix a small bug in the .null assertion docs
  • Use a regex to account for property ordering issues across engines.
  • Add make test-firefox
  • Merge pull request #​417 from astorije/astorije/minimalist-typo
  • Remove trailing whitespaces
  • Fix super minor typo in an example
  • Merge pull request #​408 from ljharb/enumerableProperty
  • Add ownPropertyDescriptor assertion.

v2.2.0

Compare Source

==================

  • Merge pull request #​405 from chaijs/deep-escape-doc-tweaks
  • Tweak documentation on .deep flag.
  • Merge pull request #​402 from umireon/escaping-dot-should-be-taken
  • Documentation of escaping in .deep flag.
  • take regular expression apart
  • Feature: backslash-escaping in .deep.property
  • Escaping dot should be taken in deep property

v2.1.2

Compare Source

==================

  • Merge pull request #​396 from chaijs/add-keith-cirkel-contributing-md
  • Add Keith Cirkel to CONTRIBUTING.md
  • Merge pull request #​395 from cjqed/386-assert-operator-no-eval
  • No longer using eval on assert operator #​386
  • Merge pull request #​389 from chaijs/update-git-summary
  • Update git summary in README

v2.1.1

Compare Source

==================

  • Merge pull request #​385 from eldritch-fossicker/master
  • updates to reflect code style preference from @​keithamus
  • fix indexing into array with deep propery
  • Merge pull request #​382 from astorije/patch-2
  • Merge pull request #​383 from gurdiga/config-doc-wording-improvement
  • config.truncateThreshold docs: simpler wording
  • Add missing docstring for showDiff argument of assert
  • Merge pull request #​381 from astorije/patch-1
  • Add a minor precision that empty asserts on strings too.
  • Merge pull request #​379 from dcneiner/should-primitive-fix
  • Primitives now use valueOf in shouldGetter

v2.1.0

Compare Source

==================

  • Merge pull request #​374 from jmm/v2.0.1
  • Increment version to 2.0.1.
  • Merge pull request #​365 from chaijs/fix-travis
  • Fix travis.yml deploy
  • Merge pull request #​356 from Soviut/master
  • documented fail methods for expect and should interfaces
  • fail method added directly to expect

v2.0.0

Compare Source

==================

  • Merge pull request #​361 from gregglind/b265-keys-object
  • fix #​359. Add .keys(object)
  • Merge pull request #​359 from gregglind/b359-unexpected-keys-sort
  • Fix #​359 keys() sorts input unexpectedly
  • contrib: publish release strategy and travis npm creds #​337
  • Merge pull request #​357 from danilovaz/master
  • Update copyright date
  • Merge pull request #​349 from toastynerd/add-which-chain-method
  • add the which chain method as per issue #​347
  • Merge pull request #​333 from cmpolis/change-assertions
  • more by cleanup
  • cleaned out .by for #​333
  • Merge pull request #​335 from DingoEatingFuzz/expose-util
  • Expose chai util through the chai object
  • cleanup (per notes on pr #​333)
  • updated change to work w/ non-number values + tests
  • Merge pull request #​334 from hurrymaplelad/patch-1
  • Typo, the flag is called 'contains' with an 's'
  • updated assertion interface with change (#​330)
  • added change,increase,decrease assertions (#​330)
  • assert tests for change,increase,decrease
  • expect/should tests for change,increase,decrease
  • Merge pull request #​328 from lo1tuma/issue-327
  • Add includes and contains alias (fixes #​327)
  • Merge pull request #​325 from chasenlehara/overwriteChainableMethodDocs
  • Fix docs for overwriteChainableMethod parameters
  • Merge pull request #​317 from jasonkarns/patch-2
  • Merge pull request #​318 from jasonkarns/patch-3
  • Merge pull request #​316 from jasonkarns/patch-1
  • typos in docs
  • minor docs typo
  • update docs: getAllFlags -> transferFlags
  • Merge pull request #​313 from cjqed/254-expect-any-all
  • Added the all and any flags for keys assertion, with all being the default behavior
  • Merge pull request #​312 from cjqed/291-assert-same-deep-members
  • Changed public comment of sameDeepMemebers to be more clear
  • Fixes issue #​291, adds assert.sameDeepMembers
  • Merge pull request #​311 from cjqed/305-above-below-on-assert
  • Merge pull request #​308 from prodatakey/hasproperty
  • Issue #​305 fixed, added assert.isAbove and assert.isBelow
  • Fix typo
  • More unit tests for new utility functions
  • Refactor common functionality, document, test
  • Refactor if statement out
  • Small unit test fix
  • Handle array indexing terminating paths
  • Merge pull request #​309 from ericdouglas/iterableEqual-couting-once
  • couting variables just once
  • Fix properties with undefined value pass property assertion
  • Merge pull request #​306 from chaijs/revert-297-noopchainfunc
  • Revert "Allows writing lint-friendly tests"

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@cypress-app-bot
Copy link
Collaborator

See the guidelines for reviewing dependency updates for info on how to review dependency update PRs.

Copy link

cypress bot commented Apr 22, 2025

cypress    Run #62288

Run Properties:  status check passed Passed #62288  •  git commit 3eb4d2425c: fix some leftover empty functions
Project cypress
Branch Review renovate/chai-3.x
Run status status check passed Passed #62288
Run duration 09m 49s
Commit git commit 3eb4d2425c: fix some leftover empty functions
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 260
View all changes introduced in this branch ↗︎
UI Coverage  44.19%
  Untested elements 72  
  Tested elements 57  
Accessibility  94.9%
  Failed rules  0 critical   6 serious   0 moderate   1 minor
  Failed elements 123  

Copy link
Contributor Author

renovate bot commented Apr 22, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@jennifer-shehane jennifer-shehane changed the title chore(deps): update dependency chai to v3 [WIP] chore(deps): update dependency chai to v3 Apr 23, 2025
@jennifer-shehane
Copy link
Member

jennifer-shehane commented Apr 29, 2025

  • Changed .to.exist() to .to.exist (removed the parentheses)
  • Updated the chaining syntax for .and.not.to.be.empty() to match Chai v3.x style
  • Fixed the assertion for checking if something is an object to use .to.exist instead of .to.an('object')
  • Object property assertions should use .to.have.property() instead of .to.contain()

@jennifer-shehane jennifer-shehane changed the title [WIP] chore(deps): update dependency chai to v3 chore(deps): update dependency chai to v3 Apr 29, 2025
@jennifer-shehane jennifer-shehane self-assigned this May 1, 2025
@jennifer-shehane jennifer-shehane merged commit 6ac467a into develop May 8, 2025
90 of 91 checks passed
@jennifer-shehane jennifer-shehane deleted the renovate/chai-3.x branch May 8, 2025 17:29
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 20, 2025

Released in 14.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v14.4.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants