Update normalizedFunctionString to handle named functions

XMLWordPrintableJSON

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

      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.
       

              Assignee:
              Rebecca Weinberger (Inactive)
              Reporter:
              Rebecca Weinberger (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: