-
Notifications
You must be signed in to change notification settings - Fork 21
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
Implemented Data Editor Svelte Test Structure #917
Conversation
dadc36d
to
09c40e9
Compare
package.json
Outdated
@@ -41,6 +41,7 @@ | |||
"package": "run-func build/yarn-scripts.ts package && yarn --cwd dist/package install && yarn --cwd dist/package vsce package --out ../../", | |||
"pretest": "yarn compile && yarn webpack", | |||
"test": "sbt test && node ./out/tests/runTest.js", |
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.
I would say that either before or after node ./out/tests/runTest.js
you want to run the svelte tests. So either,
"test": "sbt test && yarn test:svelte && node ./out/tests/runTest.js",
or
"test": "sbt test && node ./out/tests/runTest.js && yarn test:svelte",
I personally prefer the first option but either way is fine with me also. Once that is updated I think this is good to go.
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.
I initially did not have the tests being ran during the projects tests because there were a lot of compilation errors within the svelte tests. This is because of #878
Although, I found out that there are only compilation errors when mocha
is trying to compile the files with the errors. The example tests that I have do not have any so I went ahead and implemented your changes to the test scripts.
09c40e9
to
a2253ba
Compare
@shanedell I added a new script & modified 2 existing scripts:
|
Looks like the Even running the full |
So far so good for me:
|
a2253ba
to
1eca839
Compare
- Added yarn script to run data editor tests using Mocha. - Added example function and Svelte store tests. Closes apache#915
1eca839
to
2bb1732
Compare
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.
+1
This is a simple directory structure and test suite setup that utilizes the
mocha
test suite that's currently a utilized dependency. Thetest:svelte
script should be ran manually during development and is not currently implemented to be ran during packaging of the extension.With the
mocha -w
option, it does not currently support traditional sourcing of the directory due a discrepancy with with node. 1 Typingr s <Enter>
, while thetest:svelte
script is watching, will manually source the directory structure and re-run the tests. 2Closes #915
Footnotes
https://mochajs.org/#nodejs-native-esm-support ↩
https://mochajs.org/#-watch-w ↩