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 a test runner to two of the typescript tests to actually run them #3704

Merged
merged 5 commits into from Nov 30, 2023

Conversation

thomasetter
Copy link
Contributor

@thomasetter thomasetter commented Nov 13, 2023

This adds Jest as the test runner framework.
I have chosen this framework because it was the framework I managed to get running and because it seems reasonably popular:
https://2022.stateofjs.com/en-US/libraries/testing/

This uncovers that some of the tests are unrealistic code which would crash at runtime.

Before this PR, these tests were just compiled with tsc, but never run.

This PR also adds the new test script to the crates/typescript-tests/run.sh file which makes them run in the CI.

@thomasetter
Copy link
Contributor Author

thomasetter commented Nov 13, 2023

I can fix the currently not excluded tests in follow up PRs, but wanted to get the test framework in first before I write a lot of code depending on it.

@daxpedda daxpedda added the needs review Needs a review by a maintainer. label Nov 14, 2023
Copy link
Collaborator

@hamza1311 hamza1311 left a comment

Choose a reason for hiding this comment

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

Can you also update CI to run the tests

@thomasetter
Copy link
Contributor Author

Good point!

They are already running in the CI, as can be seen in the last few lines of Run cd crates/typescript-tests && ./run.sh in this pipeline run.

I clarified this in the PR description by mentioning the run.sh.

Copy link
Collaborator

@hamza1311 hamza1311 left a comment

Choose a reason for hiding this comment

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

Oh, sorry, I totally missed that! Thanks for the PR

@hamza1311 hamza1311 merged commit cfe3dc2 into rustwasm:main Nov 30, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Needs a review by a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants