-
Notifications
You must be signed in to change notification settings - Fork 73
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
base: main
Are you sure you want to change the base?
Conversation
e38faec
to
91f6b8d
Compare
@@ -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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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?
The PR will add unit tests for the utility functions written for the content creator features in the extension.