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

Init Testing Chapter #87

Merged
merged 23 commits into from
Dec 1, 2019
Merged

Init Testing Chapter #87

merged 23 commits into from
Dec 1, 2019

Conversation

4meta5
Copy link
Contributor

@4meta5 4meta5 commented Nov 19, 2019

This PR makes a few significant changes. At this point, it is ready for review.

CHANGELOG

It adds a CHANGELOG.md at the root. This file is intended to serve as a CHANGELOG similar to libp2p's changelog. It might track the growth of the recipes and reorganization of content.

In the long-run, it provides a transparent record of how things have changed without requiring that much buy in by the contributors; there should be no mandatory enforcement. When enough work has been done to warrant some bullets, this is better than nothing.

Testing Section

The new testing section is split up into three sections:

  1. basic mock runtime
  2. common test patterns
  3. custom mock runtimes

The best way to review might be to checkout the branch and mdbook build --open. I'm eager to merge this, but am also open to review. I rewrote a lot of the code while testing, which makes a lot of sense. I started writing about the execution-schedule example in greater depth here but I don't want to include it in this PR. I'll bring it into a future one.

other

Instead of rust for code block annotations, I changed it to rust, ignore so that it doesn't give users the option to try to compile (which we know doesn't work for substrate code). I actually consider this to be a pretty huge win for UX (DX).

@JoshOrndorff
Copy link
Owner

what do you think about moving Instantiable Modules to section 6.3 (under Types and Traits) and adding a new section, section 8 for Testing with 8.1: Mock Runtime for Unit Testing?

Sounds good!

@4meta5 4meta5 merged commit 09573e2 into master Dec 1, 2019
@4meta5 4meta5 deleted the more-test-coverage branch December 1, 2019 22:24
Copy link
Owner

@JoshOrndorff JoshOrndorff left a comment

Choose a reason for hiding this comment

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

Looks good.

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.

2 participants