-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Use Case
As a... Node driver developer
I want... to use chai 5
So that... we can use new features
User Experience
No changes in the user experience.
Dependencies
In our VM context we need to export some types like Error to global, because chai 4 uses `instanceof` to verify that the thrown error is of the expected type.
Chai 5 uses a different check (https://github.com/chaijs/check-error/commit/d3622a0af07ddafe5275e452e3d780bbfda14110), so we can remove these exports (that's good because we want to have as few required exports as possible), and the tests will still pass.
So we need to upgrade to chai 5. And that's this large-ish task.
This was called out in the past when we upgraded some dependencies, but we never officially made a ticket:
- https://jira.mongodb.org/browse/NODE-5698
- https://jira.mongodb.org/browse/NODE-5830
- https://jira.mongodb.org/browse/NODE-5833
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- Is there an opportunity for better cross-driver alignment or testing in this area?
- Is there an opportunity to improve existing documentation on this subject?
Update to chai 5 is a major change, it may require a large number of test changes, but thankfully no source changes.
Acceptance Criteria
Implementation Requirements
- functional reqs, potential snafus to avoid, performance targets, etc
We are using chai 5.
Testing Requirements
- unit test, spec test sync, etc
All tests pass.
Documentation Requirements
- DOCSP ticket, API docs, etc
None.
Follow Up Requirements
- additional tickets to file, required releases, etc
- if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward
None.
- blocks
-
NODE-7460 Remove Error and other unnecessary exports
-
- Blocked
-