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

Drop dependency on chai for tests #1505

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Drop dependency on chai for tests #1505

merged 1 commit into from
Mar 4, 2024

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Mar 4, 2024

The Chai testing library is now ECMAScript module only (see #1487). This could have provided a good occasion to convert tests from CommonJS modules to ECMAScript modules but then, looking into actual tests, many of them used Chai where they could just have used the basic Node.js assert module, and the few tests that used expect did not look more readable thanks to that syntax compared to a more basic assert approach.

Instead of converting test code to ECMAScript modules, this update rather drops the dependency on Chai, rewriting tests where needed to rather call regular assert functions.

The Chai testing library is now ECMAScript module only. This could have
provided a good occasion to convert tests from CommonJS modules to ECMAScript
modules, but then, looking into actual tests, many of them used Chai where they
could just have used the basic Node.js `assert` module, and the few tests that
used `expect` did not look more readable thanks to that syntax compared to a
more basic `assert` approach.

Instead of converting tes code to ECMAScript modules, this update rather drops
the dependency on Chai, rewriting tests where needed to rather call regular
`assert` functions.
@tidoust tidoust merged commit f2f6d80 into main Mar 4, 2024
1 check passed
@tidoust tidoust deleted the drop-chai branch March 4, 2024 12:59
tidoust added a commit that referenced this pull request Mar 4, 2024
Chore update:
- Re-write tests and drop dependency on Chai (#1505)

Dependencies bumped:
- Bump puppeteer from 22.2.0 to 22.3.0 (#1502)
- Bump web-specs from 3.3.1 to 3.4.0 (#1503)
- Bump undici from 6.6.2 to 6.7.0 (#1504)
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.

1 participant