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

Update normalizedFunctionString to handle named functions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: js-bson
    • Labels:
      None

      Description

      The normalizedFunctionString helper needs to be updated to standardize the string representation of named functions during testing. For example, passing in either of the following functions:

      function () {}

      or

      function func () {}

      should result in the same string representation:

      'function () {}'

      This will fix a bug in which there are discrepancies between the results of calling toString in the browser vs. in node, which becomes relevant when testing js-bson in the browser.
       

        Attachments

          Activity

            People

            • Assignee:
              rebecca.weinberger Rebecca Weinberger
              Reporter:
              rebecca.weinberger Rebecca Weinberger
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: