Skip to content

Use MochaJS's best practices #3596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
7 tasks done
andyleejordan opened this issue Sep 29, 2021 · 2 comments
Closed
7 tasks done

Use MochaJS's best practices #3596

andyleejordan opened this issue Sep 29, 2021 · 2 comments
Assignees
Labels
Area-Test Issue-Enhancement A feature request (enhancement).

Comments

@andyleejordan
Copy link
Member

andyleejordan commented Sep 29, 2021

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

@andyleejordan
Copy link
Member Author

Oh THIS is what I was working on @rjmholt 😅

@andyleejordan
Copy link
Member Author

Resolved by #3643.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Test Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

1 participant