Closed kariy closed 1 month ago
Ohayo, sensei! This pull request introduces significant modifications to the testing framework by transitioning from the KatanaRunner
and its configuration to a more streamlined approach using the katana_runner::test
attribute macro. The changes affect multiple test files, updating function signatures to accept a &RunnerCtx
parameter and simplifying test setups by removing the manual instantiation of KatanaRunner
. This results in a cleaner and more efficient testing process across various modules.
Files | Change Summary |
---|---|
bin/sozo/tests/register_test.rs , bin/sozo/tests/test_migrate.rs , crates/dojo-world/src/contracts/model_test.rs , crates/dojo-world/src/contracts/world_test.rs , crates/dojo-world/src/manifest/manifest_test.rs |
Updated test functions to use katana_runner::test macro and modified signatures to accept &RunnerCtx instead of instantiating KatanaRunner . |
crates/katana/runner/macro/src/config.rs , crates/katana/runner/macro/src/entry.rs , crates/katana/runner/tests/runner.rs |
Altered configurations to utilize syn::Expr instead of syn::Lit for various fields, enhancing flexibility in expression handling. |
crates/sozo/ops/src/tests/auth.rs , crates/sozo/ops/src/tests/call.rs , crates/sozo/ops/src/tests/migration.rs , crates/sozo/ops/src/tests/model.rs , crates/sozo/ops/src/tests/utils.rs , crates/torii/core/src/sql_test.rs , crates/torii/grpc/src/server/tests/entities_test.rs |
Refactored test functions to use katana_runner::test attributes, removing KatanaRunner instantiation and updating signatures to include &RunnerCtx . |
RunnerCtx
parameter.sozo
Attention: Patch coverage is 89.47368%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 68.44%. Comparing base (
bb149b7
) to head (c67b0bd
). Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
crates/katana/runner/macro/src/config.rs | 83.33% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by CodeRabbit
New Features
katana_runner::test
attributes, enhancing test efficiency and readability across various test files.Bug Fixes
Refactor
KatanaRunner
toRunnerCtx
in multiple test functions, simplifying the instantiation process and enhancing code maintainability.Tests
&RunnerCtx
parameter, aligning with the new structure for better context management.