Add assert.doesNotThrow() javascript shell function

XMLWordPrintableJSON

    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Analogue to assert.throws. Should be used to self-document when the expected failure mode for a test case is for an exception to be thrown. Will output a stack trace through doassert (note that output generated for uncaught exceptions currently does not even include a line number).

      assert.doesNotThrow = function(func, params, msg) { ... };
      assert.doesNotThrow.automsg = function(func, params) { ... };
      

      Example usage:

      assert.doesNotThrow(function() { db.foo.find({a:{$gt:0}}).itcount(); },
                          [],
                          "testing that the $gt operator is recognized");
      

            Assignee:
            J Rassi (Inactive)
            Reporter:
            J Rassi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: