Remove assert.commandFailed() and assert.throws()

XMLWordPrintableJSON

    • Server Programmability
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As max.hirschhorn@mongodb.com said well, "assert.commandFailedWithCode() should always be preferred over assert.commandFailed() because it is possible to write the input parameters to a command incorrectly where it fails with BadValue/TypeMismatch/FailedToParse/etc. and means the test isn't exercising what it intended".

      assert.throws has the same problem and assert.throwsWithCode should be used instead.

              Assignee:
              Unassigned
              Reporter:
              Judah Schvimer
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: