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

feat: upgrade test packages to jest #19

Closed
wants to merge 6 commits into from

Commits on Dec 28, 2023

  1. Configuration menu
    Copy the full SHA
    f2eccb8 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2023

  1. fix(build): object is possibly null

    The return value of `findOneAndDelete` can be null, causing (modern) typescript to raise `TS2531: Object is possibly 'null'`
    joelluijmes committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    26ed5a8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d32296c View commit details
    Browse the repository at this point in the history
  3. fix(connection-state-recovery): pin mongodb due breaking change

    Between 5 -> 6, the return value of `findOneAndDelete` changed. It now returns the document or null directly, see 'https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES_6.0.0.md#findoneandx-family-of-methods-will-now-return-only-the-found-document-or-null-by-default-includeresultmetadata-is-false-by-default'
    
    By pinning the version we'll mitigate potential breaking changes in future.
    joelluijmes committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    93658ee View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4297603 View commit details
    Browse the repository at this point in the history
  5. feat: upgrade test packages to jest

    The packages nyc and expect.js didn't have any active commits in many years.
    jest seems like a sensible choice to switch to.
    
    In future, the tests might be better refactored to remove the done callback pattern and use proper promises.
    Another thing I couldn't easily fix is the beforeEach delay of 200ms, this makes tests unnecessarily slow.
    joelluijmes committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    b6bbc7a View commit details
    Browse the repository at this point in the history