Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODE-593

Fix mocha test error output sourcemap to point to ts not js out

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • No version
    • Affects Version/s: None
    • Component/s: Testing
    • None
    • Developer Tools
    • 3
    • Not Needed
    • Iteration Ionosphere

      We run most of the tests in VSCode in the VSCode testing integration. Because of this we first need to build them to js and use that in the tests (out folder). As a result of this, when a test fails the output points to the built js. This adds an extra manual step to debugging an issue and finding line numbers.
      Example:
      TypeError: Cannot read properties of undefined (reading 'path')
      color: Color value is invalid
      at Context.<anonymous> (out/test/suite/mdbExtensionController.test.js:172:81)

      https://github.com/mongodb-js/vscode/actions/runs/10472934369/job/29010612822?pr=780#step:4:1804 

      We should update our test config to source map back to the ts and report it there so we can improve our debugging.

      This only applies to the regular tests, not the webview tests (those already provide the .ts location)

            Assignee:
            Unassigned Unassigned
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: