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

Add tests to ensure that no BigInt features are used when useBigInt64 flag is set to false

    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      As a driver engineer
      I want to add tests that ensure that js-bson works in environments that don't support BigInt
      So that we can be sure that js-bson functions in restricted environments

      Description

      The BigInt support initiative has led to a large number of significant code changes that make use of the fairly new (added in 2018) BigInt class in Javascript. We need to make sure that in environments that do not support BigInt directly, users can still rely on the existing functionality of the library and the Long class.

      Unknowns

      • do we need to create a new CI variant that runs these tests?
        • Yes, as this would check all of the same code paths that we already test to catch any new or unexpected uses of BigInt APIs
      • Is it sufficient to just make use of node:vm to simulate a restricted environment?

      Acceptance Criteria

      • Tests that check for prior functionality of js-bson when useBigInt64 is false in an environment that does not support bigint
      • Create eslint plugin to check for use of BigInt literals and functions
      • Add evergreen task that runs bson test suite without access to BigInt APIs

            Assignee:
            warren.james@mongodb.com Warren James
            Reporter:
            warren.james@mongodb.com Warren James
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: