Skip to content

Commit

Permalink
Fix import in tutorial (redwoodjs#4838)
Browse files Browse the repository at this point in the history
* fix import

* fix redwoodjs#4836
  • Loading branch information
jtoar authored Mar 20, 2022
1 parent 99a849d commit 055c4b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/tutorial2/our-first-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The test was looking for the full text of the blog post, but remember that in `A

Let's update the test so that it checks for the expected behavior instead. There are entire books written on the best way to test, so no matter what we decide on testing in this code there will be someone out there to tell us we're doing it wrong. As just one example, the simplest test would be to just copy what's output and use that for the text in the test:

```jsx title="web/src/components/BlogPostsCell.test.js"
```jsx title="web/src/components/ArticlesCell.test.js"
test('Success renders successfully', async () => {
const posts = standard().posts
render(<Success posts={posts} />)
Expand Down Expand Up @@ -49,9 +49,9 @@ This gives us a buffer if we decide to truncate to something like 25 words, or e
Okay, let's do this:

```jsx title="web/src/components/ArticlesCell.test.js"
import { render, screen } from '@redwoodjs/testing'
// highlight-next-line
import { Loading, Empty, Failure, Success, within } from './ArticlesCell'
import { render, screen, within } from '@redwoodjs/testing'
import { Loading, Empty, Failure, Success } from './ArticlesCell'
import { standard } from './ArticlesCell.mock'

describe('ArticlesCell', () => {
Expand Down

0 comments on commit 055c4b3

Please sign in to comment.