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

Add a sinon.restore call to global mocha afterEach hook

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Testing
    • Labels:

      Use Case

      As a... driver engineer
      I want... to add a call to sinon.restore to the global mocha afterEach hook
      So that... sinon stubs and fakes are always cleaned up after each test

      User Impact

      • None, this is for us

      Dependencies

      • None

      Unknowns

      • How many tests exist that share a sinon stub/fake that will need to be updated

      Acceptance Criteria

      Implementation Requirements

      • remove all calls to sinon.restore in our unit tests
      • add a call to sinon.restore in the global mocha afterEach hook
      • clean up any tests which break as a result of these changes

      Testing Requirements

      • N/A

      Documentation Requirements

      • N/A

      Follow Up Requirements

      • None

            Assignee:
            Unassigned Unassigned
            Reporter:
            warren.james@mongodb.com Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: