-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat: introduce testing configs #1119
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
This pull request introduces a significant refactoring of the testing utilities in the Eternum project. It separates the testing utilities into different modules (config, constants, general, systems, and world), which improves organization and maintainability. The changes also include updates to the map tests to use these new utilities, and some minor adjustments to the SDK to maintain consistency with the contract function names. Overall, this refactoring should make it easier to write and maintain tests in the future. The changes look good, but it might be helpful to add more comments explaining the rationale behind some of the constant value changes and the new utility functions.
Thanks for using MentatBot. Give comments a 👍 or 👎 to help me improve!
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
PR Type
Enhancement, Tests
Description
set_explore_config
toset_exploration_config
in both configuration setup and provider.spawn_eternum
anddeploy_system
across multiple test files.Changes walkthrough 📝
8 files
index.ts
Rename
set_explore_config
toset_exploration_config
in configurationsetup
sdk/packages/eternum/src/config/index.ts
set_explore_config
toset_exploration_config
.index.ts
Rename `set_explore_config` to `set_exploration_config` in provider
sdk/packages/eternum/src/provider/index.ts
set_explore_config
toset_exploration_config
.testing.cairo
Split testing utilities into multiple modules
contracts/src/utils/testing.cairo
config.cairo
Add configuration-related testing utilities module
contracts/src/utils/testing/config.cairo
constants.cairo
Add constants module for testing
contracts/src/utils/testing/constants.cairo
general.cairo
Add general testing utilities module
contracts/src/utils/testing/general.cairo
systems.cairo
Add system-related testing utilities module
contracts/src/utils/testing/systems.cairo
world.cairo
Add world-related testing utilities module
contracts/src/utils/testing/world.cairo
21 files
combat.cairo
Update import path for `spawn_eternum` in combat tests
contracts/src/models/combat.cairo
spawn_eternum
.owner.cairo
Update import path for `spawn_eternum` in owner tests
contracts/src/models/owner.cairo
spawn_eternum
.resources.cairo
Update import paths for
spawn_eternum
anddeploy_system
in resourcestests
contracts/src/models/resources.cairo
spawn_eternum
anddeploy_system
.road.cairo
Update import path for `spawn_eternum` in road tests
contracts/src/models/road.cairo
spawn_eternum
.bank.cairo
Update import paths for
spawn_eternum
anddeploy_system
in bank testscontracts/src/systems/bank/tests/bank.cairo
spawn_eternum
anddeploy_system
.liquidity.cairo
Update import paths for
spawn_eternum
anddeploy_system
in liquiditytests
contracts/src/systems/bank/tests/liquidity.cairo
spawn_eternum
anddeploy_system
.swap.cairo
Update import paths for
spawn_eternum
anddeploy_system
in swap testscontracts/src/systems/bank/tests/swap.cairo
spawn_eternum
anddeploy_system
.hyperstructure_config_tests.cairo
Update import paths for
spawn_eternum
anddeploy_system
inhyperstructure config tests
contracts/src/systems/config/tests/hyperstructure_config_tests.cairo
spawn_eternum
anddeploy_system
.tests.cairo
Update import paths for
spawn_eternum
anddeploy_system
in guild testscontracts/src/systems/guild/tests.cairo
spawn_eternum
anddeploy_system
.tests.cairo
Update import paths for various utility functions in hyperstructure
tests
contracts/src/systems/hyperstructure/tests.cairo
spawn_eternum
,deploy_system
, and otherutility functions.
internal_leveling_tests.cairo
Update import paths for
spawn_eternum
anddeploy_system
in internalleveling tests
contracts/src/systems/leveling/tests/internal_leveling_tests.cairo
spawn_eternum
anddeploy_system
.realm_leveling_tests.cairo
Update import paths for various utility functions in realm leveling
tests
contracts/src/systems/leveling/tests/realm_leveling_tests.cairo
spawn_eternum
,deploy_system
, and otherutility functions.
tests.cairo
Refactor setup function and update import paths in map tests
contracts/src/systems/map/tests.cairo
tests.cairo
Update import paths for various utility functions in realm tests
contracts/src/systems/realm/tests.cairo
spawn_eternum
,deploy_system
, and otherutility functions.
resource_approval_system_tests.cairo
Update import paths for
spawn_eternum
anddeploy_system
in resourceapproval system tests
contracts/src/systems/resources/tests/resource_approval_system_tests.cairo
spawn_eternum
anddeploy_system
.resource_transfer_system_tests.cairo
Update import paths for
spawn_eternum
anddeploy_system
in resourcetransfer system tests
contracts/src/systems/resources/tests/resource_transfer_system_tests.cairo
spawn_eternum
anddeploy_system
.accept_order.cairo
Update import paths for various utility functions in trade system
accept order tests
contracts/src/systems/trade/tests/trade_systems_tests/accept_order.cairo
spawn_eternum
,deploy_system
, and otherutility functions.
cancel_order.cairo
Update import paths for various utility functions in trade system
cancel order tests
contracts/src/systems/trade/tests/trade_systems_tests/cancel_order.cairo
spawn_eternum
,deploy_system
, and otherutility functions.
create_order.cairo
Refactor setup function and update import paths in trade system create
order tests
contracts/src/systems/trade/tests/trade_systems_tests/create_order.cairo
road_systems_tests.cairo
Update import paths for
spawn_eternum
anddeploy_system
in roadsystems tests
contracts/src/systems/transport/tests/road_systems_tests.cairo
spawn_eternum
anddeploy_system
.travel_systems_tests.cairo
Update import paths for
spawn_eternum
anddeploy_system
in travelsystems tests
contracts/src/systems/transport/tests/travel_systems_tests.cairo
spawn_eternum
anddeploy_system
.