Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45506

Add custom generated messages for assert.soon & siblings

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Testing Infrastructure
    • None
    • Sharding

    Description

      Currently, assert.soon accepts a message as a parameter. However, the string is a fixed message that is constructed during the call to assert.soon. It would be nice to have some way of constructing helpful error messages when assert.soon timeout is triggered.

      Something like this or better:

      let str = "msg";
      assert.soon(() => {
        str = "I changed msg";
        return false;
      }, () => { return str; });
      

      Attachments

        Activity

          People

            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: