Skip to content
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

Add unit tests for content creator utility functions #1318

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

priyamsahoo
Copy link
Contributor

The PR will add unit tests for the utility functions written for the content creator features in the extension.

@priyamsahoo priyamsahoo reopened this May 23, 2024
@@ -956,7 +956,7 @@
"package": "./tools/package.sh",
"preinstall": "",
"pretest": "yarn run compile",
"unit-tests": "nyc mocha --recursive test/units",
"unit-tests": "nyc mocha --recursive test/units/lightspeed",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you trigger these new tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are triggered using the test-e2e script.
These new tests depend on the vscode engine, and thus, it is not possible to trigger them using mocha.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually the reason why we created the tests/units directory originally. The idea was that unit-tests should not import vscode at all and just depend on a regular Javascript environment. If your tests are depending on the vscode run-time, maybe you can move your tests in a different directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants