Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: chaijs/chai
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.5.0
Choose a base ref
...
head repository: chaijs/chai
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.0.0
Choose a head ref

Commits on Mar 2, 2021

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    312b8f8 View commit details
  2. chore: drop support for Node < 12

    BREAKING CHANGE:
    
    This package no longer supports Node.js 4 through 12
    keithamus committed Mar 2, 2021

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    6b8e6e6 View commit details
  3. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    c65a332 View commit details
  4. chore: bump deep-eql@4

    keithamus committed Mar 2, 2021

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    3316e8b View commit details
  5. Create npm-publish.yml

    keithamus authored Mar 2, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bd0568f View commit details
  6. Create node.js.yml

    keithamus authored Mar 2, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c9c71dd View commit details
  7. Delete .travis.yml

    keithamus authored Mar 2, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9e928d6 View commit details
  8. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    e20aef4 View commit details

Commits on Jun 27, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    120a338 View commit details

Commits on Sep 17, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    865c65d View commit details

Commits on Oct 8, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a8b8d79 View commit details

Commits on Oct 11, 2021

  1. build: convert Makefile script to npm scripts (#1424)

    * Convert Makefile script to npm scripts
    
    * Change node version 15 to version 16
    koddsson authored Oct 11, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f3ffa15 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a8359d3 View commit details

Commits on Jan 25, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    53315df View commit details

Commits on Nov 7, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    84abea1 View commit details

Commits on Feb 7, 2023

  1. ES module conversion PoC (#1498)

    * Fixed a regression that caused SyntaxErrors on IE 11
    
    The changes made in #1334 incorrectly used an arrow function and as this isn't supported on IE 11 it causes a SyntaxError to be thrown when loading chai.
    
    * chai@4.3.2
    
    * export chai.Assertion (#1378)
    
    * chai@4.3.3
    
    * fix: support inspecting bigints (#1321) (#1383)
    
    * 4.3.4
    
    * feat: use chaijs/loupe for inspection (#1401) (#1407)
    
    Fix #1228
    
    * fix: package.json - deprecation warning on exports field (#1400)
    
    * fix package.json exports
    
    * build(deps-dev): bump codecov from 3.1.0 to 3.7.1 (#1446)
    
    Bumps [codecov](https://github.com/codecov/codecov-node) from 3.1.0 to 3.7.1.
    - [Release notes](https://github.com/codecov/codecov-node/releases)
    - [Changelog](https://github.com/codecov/codecov-node/blob/master/CHANGELOG.md)
    - [Commits](codecov/codecov-node@v3.1.0...v3.7.1)
    
    ---
    updated-dependencies:
    - dependency-name: codecov
      dependency-type: direct:development
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    
    * build chaijs
    
    * 4.3.5
    
    * fix: use loupe@^2.3.1
    
    * build chaijs
    
    * 4.3.6
    
    * fix: deep-eql bump package to support symbols comparison (#1483)
    
    * 4.3.7
    
    * build
    
    * chore: 4.x.x: Fix link to commit logs on GitHub (#1487)
    
    * 4.x.x: Fix link to commit logs on GitHub
    
    As there is no `master` branch, the link returned a 404.
    
    * Update History.md
    
    Co-authored-by: Andre Meyering <info@andremeyering.de>
    
    Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    
    * build(deps): bump socket.io-parser from 4.0.4 to 4.0.5 (#1488)
    
    Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
    - [Release notes](https://github.com/socketio/socket.io-parser/releases)
    - [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
    - [Commits](socketio/socket.io-parser@4.0.4...4.0.5)
    
    ---
    updated-dependencies:
    - dependency-name: socket.io-parser
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    
    * test: fix typo in test.js (#1459)
    
    * docs: specify return type of objDisplay (#1490)
    
    previously it was incorrectly labeled as `objDisplay(obj: object): void` in `@types/chai`.
    
    * feat: rework into ES modules
    
    This moves all of the sources to be ES modules rather than CommonJS.
    
    In order to produce the entrypoints, we use esbuild as a bundler (and as
    a transpiler in a way).
    
    Due to the fact that some dependencies are written in CommonJS, we
    actually use esbuild to create _two_ bundles: a CommonJS bundle, and an
    ES module bundle.
    
    Otherwise, someone importing the raw source would inevitably end up
    trying to import a CommonJS module somewhere down the tree, which would
    not work in browsers natively.
    
    ---------
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: Lee Newson <lnewso@hotmail.com>
    Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
    Co-authored-by: rbruckheimer <rob@cosaic.io>
    Co-authored-by: Mike Frysinger <vapier@gmail.com>
    Co-authored-by: Pascal Corpet <pcorpet@users.noreply.github.com>
    Co-authored-by: Mimi <stevenjoezhang@gmail.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Scott Newcomer <snewcomer@users.noreply.github.com>
    Co-authored-by: Andre Meyering <info@andremeyering.de>
    Co-authored-by: Mavaddat Javid <5055400+mavaddat@users.noreply.github.com>
    Co-authored-by: scarf <greenscarf005@gmail.com>
    Co-authored-by: James Garbutt <james.garbutt@crispthinking.com>
    13 people authored Feb 7, 2023

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    b8a4285 View commit details
  2. drop support for node<16

    keithamus authored Feb 7, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    45744cf View commit details
  3. use node 18 for publish

    keithamus authored Feb 7, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e2fa47d View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3076fb3 View commit details

Commits on Feb 15, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ad82f62 View commit details

Commits on Jul 26, 2023

  1. update pathval (#1527)

    Kristján Oddsson authored Jul 26, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ca99d66 View commit details
  2. update check-error (#1528)

    Kristján Oddsson authored Jul 26, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c6481e0 View commit details
  3. 5.0.0-alpha.1

    koddsson committed Jul 26, 2023

    Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    f32439f View commit details

Commits on Oct 18, 2023

  1. update deep-eql to latest version (#1542)

    Kristján Oddsson authored Oct 18, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    de9fa39 View commit details

Commits on Oct 20, 2023

  1. Inline type-detect as a simple function (#1544)

    * inline `type-detect` as a simple function
    
    * Add type-detec tests
    
    * update type-detect function
    
    * update existing tests
    Kristján Oddsson authored Oct 20, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9e276dc View commit details
  2. update loupe (#1545)

    Kristján Oddsson authored Oct 20, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9011298 View commit details

Commits on Oct 21, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    528f4da View commit details
  2. Update assertion-error to it's latest major version! (#1543)

    * update assertion-error
    
    * update `assertion-error` once more
    
    * update expected string in test
    Kristján Oddsson authored Oct 21, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    54d3e6b View commit details

Commits on Oct 23, 2023

  1. Replacing Karma with Web Test Runner (#1546)

    * Replace Karma with Web Test Runner
    
    * remove karma dependencies
    
    * remove `assertion-error` from commonjs plugin list
    
    * remove redundant mocha options
    
    * run browsers in ci
    
    * fix ci script
    
    * change name from chrome to chromium
    
    * install playwright dependencies
    
    * import chai from correct place
    
    * drop checking in safari
    Kristján Oddsson authored Oct 23, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0fc290b View commit details

Commits on Oct 25, 2023

  1. Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    947ff86 View commit details

Commits on Oct 30, 2023

  1. 5.0.0

    koddsson committed Oct 30, 2023

    Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    723759c View commit details
Showing with 13,703 additions and 22,615 deletions.
  1. +30 −0 .github/workflows/browsers.yml
  2. +33 −0 .github/workflows/node.js.yml
  3. +47 −0 .github/workflows/npm-publish.yml
  4. +3 −0 .gitignore
  5. +0 −33 .travis.yml
  6. +1 −1 History.md
  7. +0 −117 Makefile
  8. +3 −37 README.md
  9. +0 −10,986 chai.js
  10. +1 −1 index.js
  11. +0 −13 index.mjs
  12. +4 −3 karma.conf.js → karma.conf.cjs
  13. +29 −28 lib/chai.js
  14. +150 −163 lib/chai/assertion.js
  15. +1 −1 lib/chai/config.js
  16. +3,634 −3,634 lib/chai/core/assertions.js
  17. +3,036 −3,042 lib/chai/interface/assert.js
  18. +40 −37 lib/chai/interface/expect.js
  19. +203 −204 lib/chai/interface/should.js
  20. +8 −8 lib/chai/utils/addChainableMethod.js
  21. +3 −3 lib/chai/utils/addLengthGuard.js
  22. +8 −8 lib/chai/utils/addMethod.js
  23. +7 −7 lib/chai/utils/addProperty.js
  24. +3 −3 lib/chai/utils/compareByInspect.js
  25. +5 −5 lib/chai/utils/expectTypes.js
  26. +2 −2 lib/chai/utils/flag.js
  27. +2 −2 lib/chai/utils/getActual.js
  28. +5 −5 lib/chai/utils/getMessage.js
  29. +5 −6 lib/chai/utils/getOperator.js
  30. +3 −3 lib/chai/utils/getOwnEnumerableProperties.js
  31. +2 −2 lib/chai/utils/getOwnEnumerablePropertySymbols.js
  32. +2 −2 lib/chai/utils/getProperties.js
  33. +30 −34 lib/chai/utils/index.js
  34. +8 −354 lib/chai/utils/inspect.js
  35. +2 −2 lib/chai/utils/isNaN.js
  36. +3 −3 lib/chai/utils/isProxyEnabled.js
  37. +5 −4 lib/chai/utils/objDisplay.js
  38. +6 −6 lib/chai/utils/overwriteChainableMethod.js
  39. +8 −8 lib/chai/utils/overwriteMethod.js
  40. +7 −7 lib/chai/utils/overwriteProperty.js
  41. +7 −7 lib/chai/utils/proxify.js
  42. +4 −4 lib/chai/utils/test.js
  43. +2 −2 lib/chai/utils/transferFlags.js
  44. +16 −0 lib/chai/utils/type-detect.js
  45. +5,148 −3,531 package-lock.json
  46. +25 −25 package.json
  47. +3 −0 register-assert.cjs
  48. +3 −1 register-assert.js
  49. +3 −0 register-expect.cjs
  50. +3 −1 register-expect.js
  51. +3 −0 register-should.cjs
  52. +3 −1 register-should.js
  53. +40 −37 test/assert.js
  54. +3 −7 test/bootstrap/index.js
  55. +5 −0 test/configuration.js
  56. +3 −4 test/display/errors.js
  57. +9 −9 test/display/message.js
  58. +0 −11 test/esm.mjs
  59. +120 −96 test/expect.js
  60. +8 −5 test/globalErr.js
  61. +2 −0 test/globalShould.js
  62. +2 −0 test/plugins.js
  63. +90 −87 test/should.js
  64. +7 −0 test/type-detect/deno-test.ts
  65. +339 −0 test/type-detect/dom.js
  66. +279 −0 test/type-detect/index.js
  67. +143 −0 test/type-detect/new-ecmascript-types.js
  68. +25 −0 test/type-detect/node.js
  69. +27 −0 test/type-detect/tostringtag-extras.js
  70. +25 −13 test/utilities.js
  71. +17 −0 web-test-runner.config.js
30 changes: 30 additions & 0 deletions .github/workflows/browsers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source
# code and run tests across different versions of browsers

name: Browsers CI

on:
push:
branches: [ main, 4.x.x, 5.x.x ]
pull_request:
branches: [ main, 4.x.x, 5.x.x ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
browser-name:
- chromium
- firefox

steps:
- uses: actions/checkout@v4
- name: ${{ matrix.browser-name }}
uses: actions/setup-node@v3
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run build --if-present
- run: npm run test-chrome -- --browsers ${{ matrix.browser-name }}
33 changes: 33 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ main, 4.x.x, 5.x.x ]
pull_request:
branches: [ main, 4.x.x, 5.x.x ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- 16 # to be removed 2023-09-11
- 18 # to be removed 2025-04-30
- 19 # to be removed 2023-06-01
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
47 changes: 47 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -21,3 +21,6 @@ coverage

test/auth/*
!test/auth/.gitkeep

/chai.js
/chai.cjs
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion History.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Note

As of 3.0.0, the History.md file has been deprecated. [Please refer to the full
commit logs available on GitHub](https://github.com/chaijs/chai/commits/master).
commit logs available on GitHub](https://github.com/chaijs/chai/commits).

---

117 changes: 0 additions & 117 deletions Makefile

This file was deleted.

40 changes: 3 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -11,42 +11,16 @@
</p>

<p align=center>
<a href="./LICENSE">
<img
alt="license:mit"
src="https://img.shields.io/badge/license-mit-green.svg?style=flat-square"
/>
</a>
<a href="https://github.com/chaijs/chai/releases">
<img
alt="tag:?"
src="https://img.shields.io/github/tag/chaijs/chai.svg?style=flat-square"
/>
</a>
<a href="https://www.npmjs.com/package/chai">
<img
alt="node:?"
src="https://img.shields.io/badge/node-%3E=4.0-blue.svg?style=flat-square"
/>
</a>
<br/>
<a href="https://saucelabs.com/u/chaijs">
<img
alt="Selenium Test Status"
src="https://saucelabs.com/browser-matrix/chaijs.svg"
/>
</a>
<br/>
<a href="https://www.npmjs.com/packages/chai">
<img
alt="downloads:?"
src="https://img.shields.io/npm/dm/chai.svg?style=flat-square"
/>
</a>
<a href="https://travis-ci.org/chaijs/chai">
<a href="https://www.npmjs.com/package/chai">
<img
alt="build:?"
src="https://img.shields.io/travis/chaijs/chai/master.svg?style=flat-square"
alt="node:?"
src="https://img.shields.io/badge/node-%3E=4.0-blue.svg?style=flat-square"
/>
</a>
<a href="https://codecov.io/gh/chaijs/chai">
@@ -55,12 +29,6 @@
src="https://img.shields.io/codecov/c/github/chaijs/chai.svg?style=flat-square"
/>
</a>
<a href="">
<img
alt="devDependencies:?"
src="https://img.shields.io/david/chaijs/chai.svg?style=flat-square"
/>
</a>
<br/>
<a href="https://chai-slack.herokuapp.com/">
<img
@@ -177,11 +145,9 @@ Chai offers a robust Plugin architecture for extending Chai's assertions and int
- [chaijs / chai-docs](https://github.com/chaijs/chai-docs): The chaijs.com website source code.
- [chaijs / assertion-error](https://github.com/chaijs/assertion-error): Custom `Error` constructor thrown upon an assertion failing.
- [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser.
- [chaijs / type-detect](https://github.com/chaijs/type-detect): Improved typeof detection for Node.js and the browser.
- [chaijs / check-error](https://github.com/chaijs/check-error): Error comparison and information related utility for Node.js and the browser.
- [chaijs / loupe](https://github.com/chaijs/loupe): Inspect utility for Node.js and browsers.
- [chaijs / pathval](https://github.com/chaijs/pathval): Object value retrieval given a string path.
- [chaijs / get-func-name](https://github.com/chaijs/get-func-name): Utility for getting a function's name for node and the browser.

### Contributing

Loading