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

Testing utils #274

Merged
merged 2 commits into from
May 1, 2023
Merged

Conversation

aymericdelab
Copy link
Contributor

Features

  1. testing of move system in the examples folder
  2. test_utils module in dojo_core with a spawn_test_world that:
    a. deploys executor
    b. deploys world contract
    c. registers systems/components
    d. returns a world contract

Current issues

  • In order to deploy executor and world in examples/, simply importing executor and world from dojo_core does not work. I need to copy paste the executor contract and world contract in the examples folder or else i'm getting a CLASS_HASH_NOT_FOUND error.
  • commands:: are not available in test atm, if we'd prefer having spawn_test_world as a commands, we'd need to add that first.

@aymericdelab aymericdelab changed the title feat: add examples testing + test_utils Testing utils May 1, 2023
@tarrencev
Copy link
Contributor

@aymericdelab I pushed a change here to support compiling Executor and World contracts in tests

@tarrencev tarrencev marked this pull request as ready for review May 1, 2023 16:30
@tarrencev tarrencev merged commit f9fc0cc into dojoengine:main May 1, 2023
@gogo2464
Copy link

gogo2464 commented May 2, 2023

seems a good pr for me. There is never enough pr in a project.

Could we just use doctest for API documentation please?

I am going to create an issue.

https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#documentation-tests

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