Skip to content

Use MochaJS's best practices #3596

Closed
Closed
@andyleejordan

Description

@andyleejordan

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.

Summary

  • Convert from TDD to BDD which use describe() and it() instead of suite() and test().
  • The use of lambdas for unit tests is also discouraged because it prevents the use of Mocha's test context.
  • Moreover, we have a number of tests which use foreach loops that should instead be parameterized tests.
  • I introduced a ensureExtensionIsActivated utility method, but we also need an ensureEditorServicesIsConnected utility method to reduce the flakiness of the new debugger test, and it should use a hook-level timeout when waiting for the connection.
  • Enable --enable-source-maps since we use transpiled TypeScript. Not possible again because the tests first launch Code, a Node app.

Proposed Design

N/A

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions