Skip to content

Commit

Permalink
make tests more forgiving
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Dec 17, 2024
1 parent 423811c commit 8d17a2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions exercises/04.components/01.solution.function/content.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ await testStep('Proper elements are rendered to the DOM', async () => {
const messages = Array.from(element.querySelectorAll('.message'))
expect(messages, 'messages not found').to.have.length(2)
const [helloMessage, goodbyeMessage] = messages
expect(helloMessage?.textContent).to.equal('Hello World')
expect(goodbyeMessage?.textContent).to.equal('Goodbye World')
expect(helloMessage?.textContent?.toLowerCase()).to.equal('hello world')
expect(goodbyeMessage?.textContent?.toLowerCase()).to.equal('goodbye world')
})
4 changes: 2 additions & 2 deletions exercises/04.components/02.solution.raw/content.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ await testStep('Proper elements are rendered to the DOM', async () => {
const messages = Array.from(element.querySelectorAll('.message'))
expect(messages, 'messages not found').to.have.length(2)
const [helloMessage, goodbyeMessage] = messages
expect(helloMessage?.textContent).to.equal('Hello World')
expect(goodbyeMessage?.textContent).to.equal('Goodbye World')
expect(helloMessage?.textContent?.toLowerCase()).to.equal('hello world')
expect(goodbyeMessage?.textContent?.toLowerCase()).to.equal('goodbye world')
})
4 changes: 2 additions & 2 deletions exercises/04.components/03.solution.jsx/content.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ await testStep('Proper elements are rendered to the DOM', async () => {
const messages = Array.from(element.querySelectorAll('.message'))
expect(messages, 'messages not found').to.have.length(2)
const [helloMessage, goodbyeMessage] = messages
expect(helloMessage?.textContent).to.equal('Hello World')
expect(goodbyeMessage?.textContent).to.equal('Goodbye World')
expect(helloMessage?.textContent?.toLowerCase()).to.equal('hello world')
expect(goodbyeMessage?.textContent?.toLowerCase()).to.equal('goodbye world')
})

0 comments on commit 8d17a2d

Please sign in to comment.