Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Adds testing documentation #530

Merged
merged 21 commits into from
Mar 12, 2021
Merged

Adds testing documentation #530

merged 21 commits into from
Mar 12, 2021

Conversation

cannikin
Copy link
Member

I'm holding up this Rails Guide to testing as my gold standard: https://guides.rubyonrails.org/testing.html

It describes everything that Rails provides for testing, and how to test all the various parts you would build (models, controllers, jobs). It's crazy thorough and is usually the first place I go if I forget how to write a test for something, even before Google. And most Google queries will return this doc as the first result anyway.

@cannikin cannikin mentioned this pull request Jan 26, 2021
5 tasks
@cannikin
Copy link
Member Author

cannikin commented Jan 26, 2021

Trying out some inline code execution with JSFiddle: https://deploy-preview-530--redwoodjs.netlify.app/docs/testing#a-simple-test

@thedavidprice
Copy link
Contributor

Nice!

Not sure you need more options, but Docusaurus v2 uses React Live for .mdx:
https://v2.docusaurus.io/docs/markdown-features/#interactive-code-editor

@cannikin cannikin marked this pull request as draft February 15, 2021 23:03
@jtoar jtoar added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 16, 2021
@jtoar jtoar removed their assignment Feb 16, 2021
@jtoar jtoar linked an issue Feb 16, 2021 that may be closed by this pull request
Copy link
Contributor

@jtoar jtoar left a comment

Choose a reason for hiding this comment

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

@cannikin This is amazing! 🤯 Planning to publish a review on this tomorrow, just takes time to enter changes from my editor into GitHub's code review. Looking at a few vscode extensions...

For now, consider this my only suggestion.

docs/testing.md Outdated Show resolved Hide resolved
@cannikin
Copy link
Member Author

Thanks! It's only probably half-way done and I haven't done a full run-through to fix flow issues, or grammar and typos. I'd love a review but you might want to wait until after all that so I get a chance to catch all the embarrassing mistakes. :)

Co-authored-by: Dominic Saadi <32992335+jtoar@users.noreply.github.com>
@jtoar
Copy link
Contributor

jtoar commented Feb 16, 2021

@cannikin Sure thing--just let me know

@cannikin
Copy link
Member Author

Oh geez, almost up to 6,000 words and I haven't event got into server-side testing yet. 😬

@cannikin
Copy link
Member Author

First draft done, 8,000 words. 😬 Let me take a pass through and fix anything glaring and then I'll hit you up @jtoar, probably tomorrow!

@cannikin cannikin marked this pull request as ready for review February 22, 2021 23:00
@cannikin
Copy link
Member Author

cannikin commented Feb 22, 2021

Okay @jtoar I think it's ready! Grand total: 8,552 words (including code, however wc decides to count that).

I did a big refactor on the section headings to get the right nav much easier to browse to a topic.

Copy link
Contributor

@jtoar jtoar left a comment

Choose a reason for hiding this comment

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

@cannikin I think I could make more edits, particularly to the latter half of the document just because I started at the top and got less and less keen as I was going, but this is a good start, and don't want to hold off reviews any longer. Let me know what you think; a good amount are just "capitalize this" because I feel like @thedavidprice and I have gone back and forth about capitalizing "Redwood nouns" like Cell, Service, etc. I think it's helpful to do so!

docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
docs/testing.md Outdated Show resolved Hide resolved
@cannikin cannikin merged commit 472150d into main Mar 12, 2021
@cannikin cannikin deleted the rc-testing-docs branch March 12, 2021 00:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for Testing package
3 participants