Skip to content

Commit 2b47db3

Browse files
committed
upgrade to React 19
1 parent 09973df commit 2b47db3

File tree

8 files changed

+4610
-2555
lines changed

8 files changed

+4610
-2555
lines changed

epicshop/package-lock.json

+2,180-1,250
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

epicshop/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"test": "playwright test"
66
},
77
"dependencies": {
8-
"@epic-web/config": "^1.5.4",
8+
"@epic-web/config": "^1.16.3",
99
"@epic-web/workshop-app": "^5.9.0",
10-
"@playwright/test": "^1.41.2",
10+
"@playwright/test": "^1.49.0",
1111
"cross-env": "^7.0.3"
1212
}
1313
}

epicshop/update-deps.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
npx npm-check-updates --dep prod,dev --upgrade --root
2-
rm -rf node_modules package-lock.json ./exercises/**/node_modules
2+
cd epicshop && npx npm-check-updates --dep prod,dev --upgrade --root
3+
cd ..
4+
rm -rf node_modules package-lock.json ./epicshop/package-lock.json ./epicshop/node_modules ./exercises/**/node_modules
35
npm install
46
npm run setup
57
npm run typecheck

exercises/06.state-initializers/01.solution.initial/index.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ await testStep('can render the app', () => {
99

1010
await testStep('Toggle is rendered and initially on', async () => {
1111
const toggleElement = await screen.findByRole('switch')
12-
expect(toggleElement).toHaveAttribute('aria-checked', 'true')
12+
expect(toggleElement).toBeChecked()
1313
})
1414

1515
await testStep('Toggle can be turned off', async () => {
1616
const toggleElement = await screen.findByRole('switch')
1717
await userEvent.click(toggleElement)
18-
expect(toggleElement).toHaveAttribute('aria-checked', 'false')
18+
expect(toggleElement).not.toBeChecked()
1919
})
2020

2121
await testStep('Clicking reset turns the toggle back on', async () => {
2222
const resetButton = await screen.findByRole('button', { name: /reset/i })
2323
await userEvent.click(resetButton)
2424
const toggleElement = await screen.findByRole('switch')
25-
expect(toggleElement).toHaveAttribute('aria-checked', 'true')
25+
expect(toggleElement).toBeChecked()
2626
})

exercises/06.state-initializers/02.solution.stability/index.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ await testStep('can render the app', () => {
99

1010
await testStep('Toggle is rendered and initially on', async () => {
1111
const toggleElement = await screen.findByRole('switch')
12-
expect(toggleElement).toHaveAttribute('aria-checked', 'true')
12+
expect(toggleElement).toBeChecked()
1313
})
1414

1515
await testStep('Toggle can be turned off', async () => {
1616
const toggleElement = await screen.findByRole('switch')
1717
await userEvent.click(toggleElement)
18-
expect(toggleElement).toHaveAttribute('aria-checked', 'false')
18+
expect(toggleElement).not.toBeChecked()
1919
})
2020

2121
await testStep('Changing initialOn updates the initialOn option', async () => {
@@ -34,6 +34,6 @@ await testStep(
3434
expect(
3535
toggleElement,
3636
'🚨 Did you forget to stablize the initalOn value?',
37-
).toHaveAttribute('aria-checked', 'true')
37+
).toBeChecked()
3838
},
3939
)
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect, testStep } from '@epic-web/workshop-utils/test'
22
import { toggleReducer } from './toggle.tsx'
33

4-
testStep('toggleReducer is exported', () => {
4+
await testStep('toggleReducer is exported', () => {
55
expect(toggleReducer).to.be.a('function')
66
})

0 commit comments

Comments
 (0)