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

Use Rust tests in wrap-rust template #1874

Merged
merged 5 commits into from
Sep 1, 2023

Conversation

krisbitney
Copy link
Contributor

@krisbitney krisbitney commented Aug 31, 2023

This PR replaces the JS e2e tests in the wrap-rust template with Rust tests. The Rust app bindings are generated and used for the e2e tests to provide a nice UX.

It also adds the Rust app bindings to the CLI, which hadn't been done yet, so codegen works as expected.

packages/templates/wasm/rust/package.json Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

since in rust you would normally create the tests folder for integration tests (for unit you would do the tests in the same file); what do you think about moving this e2e file to it/module.rs
rather than having:

|_tests/
  |_e2e.rs
  |_types/

we would have:

|_tests/
  |_it/
    |_module.rs
  |_types/

this is more idiomatic imo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

packages/templates/wasm/rust/Cargo.toml Outdated Show resolved Hide resolved
packages/templates/wasm/rust/Cargo.toml Outdated Show resolved Hide resolved
@dOrgJelli dOrgJelli merged commit 02b2f34 into origin-dev Sep 1, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants