test: completely remove chai and fix type errors - #7144
Conversation
Overall package sizeSelf size: 4.36 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.0 | 68.46 kB | 797.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7144 +/- ##
=======================================
Coverage 84.77% 84.77%
=======================================
Files 522 522
Lines 22232 22233 +1
=======================================
+ Hits 18848 18849 +1
Misses 3384 3384 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
783ea14 to
18a1a0e
Compare
BenchmarksBenchmark execution time: 2025-12-20 01:34:58 Comparing candidate commit 8f35575 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 288 metrics, 32 unstable metrics. |
3094a62 to
3012057
Compare
|
| // This is a bit like chai's `expect(expected).to.deep.include(actual)`, except | ||
| // that when it recurses it uses the same inclusion check, rather than deep | ||
| // equality. Some nice output is included. | ||
| function deepInclude (expected, actual, path = []) { |
There was a problem hiding this comment.
Nice find! Great to get rid of this redundant code. It was even exported but just not used (anymore at least)
| // OpenTracing's upstream API compatibility checks depend on `chai`, but this | ||
| // repo intentionally does not. We provide a minimal shim just for these checks | ||
| // (assert.equal, expect(...).to.not.throw(), expect(...).to.be.a()). | ||
| function createChaiShim () { |
Environment variables may only be of type string or undefined.
Instead, the code is now using Node.js assert or a native testing library available by a test runner.
fe70f24 to
ace957f
Compare
* test: fix env type errors Environment variables may only be of type string or undefined. * test: remove all chai related code Instead, the code is now using Node.js assert or a native testing library available by a test runner. * test: fix opentracing tests This uses a hack to keep them supported, since they use chai. To do so, a fake chai is introduced when loading that test file. * test: remove unused deepInclude test helper It was not used for a while and could be replaced with the more generic partial deep strict equal helper.
* test: fix env type errors Environment variables may only be of type string or undefined. * test: remove all chai related code Instead, the code is now using Node.js assert or a native testing library available by a test runner. * test: fix opentracing tests This uses a hack to keep them supported, since they use chai. To do so, a fake chai is introduced when loading that test file. * test: remove unused deepInclude test helper It was not used for a while and could be replaced with the more generic partial deep strict equal helper.
No description provided.