Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “Testing” chapter to the book (with multiple new pages and sidebar wiring), plus supporting sample Move code and a few site/theme tweaks to improve presentation and syntax highlighting.
Changes:
- Introduce a new Testing section in the book (basics, utilities, TxContext, test scenarios, system objects, random tests, coverage, gas profiling, extensions).
- Add/adjust sample Move modules used by the book (builder pattern samples; small fixes across existing samples).
- Update site styling and Prism Move grammar to better render the new content (tables, bold text,
extend modulehighlighting).
Reviewed changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| site/src/theme/prism-move.js | Extend Prism Move highlighting to recognize extend module ... headers. |
| site/src/css/custom.css | Adjust global font weights and strengthen <strong> rendering. |
| site/src/css/code.css | Render ```table fenced blocks in monospace for readability. |
| rnd/tests/rnd_tests.move | Adds a placeholder (currently commented-out) Move test file for rnd. |
| rnd/sources/rnd.move | Adds a placeholder (currently commented-out) rnd module stub. |
| rnd/Move.toml | Introduces a new Move package manifest for rnd. |
| rnd/.gitignore | Ignores build/trace/coverage artifacts for the rnd package. |
| packages/samples/sources/testing/builder_pattern_builder.move | Adds a test-only UserBuilder example + tests for the builder pattern chapter. |
| packages/samples/sources/testing/builder_pattern.move | Adds the corresponding User type used by the builder example. |
| packages/samples/sources/programmability/publisher.move | Switches cleanup in the test snippet to std::unit_test::destroy. |
| packages/samples/sources/programmability/dynamic-object-fields.move | Switches cleanup in the test snippet to std::unit_test::destroy. |
| packages/samples/sources/programmability/collections-4.move | Adds explicit u8 literal to avoid inference ambiguity in examples. |
| packages/samples/sources/programmability/collections-2.move | Adds explicit u8 literal to avoid inference ambiguity in examples. |
| packages/samples/sources/move-basics/string.move | Adds an additional string/bytes example line (currently incorrect as written). |
| packages/samples/sources/move-basics/control-flow.move | Adds explicit u64 literal for clarity/typing in an example. |
| packages/samples/sources/move-basics/comments-line.move | Adds explicit u8 literal for clarity/typing in an example. |
| packages/samples/Move.lock | Regenerates the samples lockfile to the newer format/version. |
| packages/samples/.gitignore | Ignores trace/coverage outputs for the samples package. |
| packages/hello_world/Move.lock | Regenerates the hello_world lockfile to the newer format/version. |
| book/testing/index.md | Adds Testing chapter landing page. |
| book/testing/testing-basics.md | Adds overview of Move’s unit testing model and CLI usage. |
| book/testing/good-tests.md | Adds guidance on what makes tests effective and maintainable. |
| book/testing/test-utilities.md | Documents std::unit_test helpers (assert_eq!, destroy, etc.). |
| book/testing/transaction-context.md | Documents ways to construct/simulate TxContext in tests. |
| book/testing/test-scenario.md | Documents multi-transaction testing with sui::test_scenario. |
| book/testing/using-system-objects.md | Documents test creation/usage of system objects (Clock/Random/DenyList/etc.). |
| book/testing/builder-pattern.md | Builder-pattern chapter referencing the new sample code via anchors. |
| book/testing/random-test.md | Documents #[random_test] property-style testing. |
| book/testing/extend-foreign-module.md | Documents module extensions for test helpers (e.g., foreign types). |
| book/testing/coverage.md | Documents Move coverage generation and output formats. |
| book/testing/gas-profiling.md | Documents test statistics, traces, and gas profiling workflows. |
| book/sidebar.yml | Adds the new Testing section and page ordering to the sidebar. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.