Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5342

Refactor explain tests to modern syntax and typescript

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.7.0
    • Affects Version/s: None
    • Component/s: None
    • 3
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      As a Node.js engineer
      I want tests that report errors in a way that is easy to ascertain the root cause
      So that I can determine if my feature/fix work as introduced a regression

      User Impact

      • None

      Dependencies

      • None

      Unknowns

      • Are the assertions in the tests accurate?
        • Are the assertions adequately loose? Explain's responses are based on internals of the server version, it's generally meant for human consumption only.

      Acceptance Criteria

      Implementation Requirements

      Do the following in separate commits since the syntax changes will likely have git mark the file as entirely new instead of a proper diff

      • Change file extension from .js to .ts
        • Accept linter prompted changes: require -> import
      • Refactor callback tests to async / await
      • Clean up redundant metadata
      • Improve chai assertions:
        • Ex. expect(something.key).to.be.array; -> expect(something).to.have.property('key').that.is.an.array;

      Testing Requirements

      • Existing CI must pass

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            malik.javaid@mongodb.com Malik Javaid (Inactive)
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: