result of bson.Timestamp.add is Long not a Timestamp

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • 0
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      What problem are you facing?

      > node
      > bson = require('bson')
      > bson.Timestamp.fromNumber(0).add(bson.Timestamp.ONE)
      new Long("1", true)
      

      Then after saving such a result in the database and fetching it bach, it comes as Long("1") (unsigned). This messes up deep equality assertions in tests

      What driver and relevant dependency versions are you using?

      mongodb@4.3.1
      bson@4.6.1

      Steps to reproduce?

      describes in first section above

              Assignee:
              Bailey Pearson
              Reporter:
              Adrian Gierakowski
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: