Skip to content

Commit ea262a7

Browse files
committed
Using React 19
1 parent 58caf5f commit ea262a7

File tree

3 files changed

+2334
-25
lines changed

3 files changed

+2334
-25
lines changed

package.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,27 @@
1313
},
1414
"dependencies": {
1515
"full-icu": "^1.5.0",
16-
"react": "^18.3.1",
17-
"react-dom": "^18.3.1"
16+
"react": "^19.1.1",
17+
"react-dom": "^19.1.1"
1818
},
1919
"devDependencies": {
20-
"@testing-library/jest-dom": "^6.4.8",
21-
"@testing-library/react": "^16.0.0",
22-
"@testing-library/user-event": "^14.5.2",
23-
"@types/react": "^18.3.3",
24-
"@types/react-dom": "^18.3.0",
25-
"@typescript-eslint/eslint-plugin": "^7.15.0",
26-
"@typescript-eslint/parser": "^7.15.0",
27-
"@vitejs/plugin-react-swc": "^3.5.0",
28-
"@vitest/coverage-v8": "^2.0.4",
29-
"eslint": "^8.57.0",
30-
"eslint-plugin-react-hooks": "^4.6.2",
31-
"eslint-plugin-react-refresh": "^0.4.7",
32-
"jsdom": "^24.1.1",
33-
"prettier": "^3.3.3",
34-
"typescript": "~5.3.1",
35-
"vite": "^5.3.4",
36-
"vitest": "^2.0.4"
20+
"@testing-library/dom": "^10.4.1",
21+
"@testing-library/jest-dom": "^6.8.0",
22+
"@testing-library/react": "^16.3.0",
23+
"@testing-library/user-event": "^14.6.1",
24+
"@types/react": "^19.1.1",
25+
"@types/react-dom": "^19.1.1",
26+
"@typescript-eslint/eslint-plugin": "^8.41.0",
27+
"@typescript-eslint/parser": "^8.41.0",
28+
"@vitejs/plugin-react-swc": "^4.0.1",
29+
"@vitest/coverage-v8": "^3.2.4",
30+
"eslint": "^9.34.0",
31+
"eslint-plugin-react-hooks": "^5.2.0",
32+
"eslint-plugin-react-refresh": "^0.4.20",
33+
"jsdom": "^26.1.0",
34+
"prettier": "^3.6.2",
35+
"typescript": "^5.9.2",
36+
"vite": "^7.1.3",
37+
"vitest": "^3.2.4"
3738
}
3839
}

src/App.test.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,8 @@ import { expect, test } from 'vitest'
66

77
test('convierte un valor > 0 de millas a kilómetros correctamente', async () => {
88
render(<App />)
9-
// El usuario carga 10 en millas
109
const inputMillas = screen.getByTestId('millas')
11-
// Una forma de simular la carga del usuario es lanzar manualmente un evento con la información
12-
// que recibiría el componente de React
13-
// fireEvent.change(inputMillas, { target: { value: '10' } })
14-
// una variante más declarativa es
15-
await userEvent.type(inputMillas, '10') // OJO que necesitamos el await!!
10+
await userEvent.type(inputMillas, '10')
1611
// https://stackoverflow.com/questions/52618569/set-the-locale-for-date-prototype-tolocalestring-for-jest-tests
1712
expect(kilometers()).toBe('16,093')
1813
})

0 commit comments

Comments
 (0)