Conversation
* eliminados as const * eliminados type cast en sectionContext
|
|
✅ Deploy Preview for secorto-astro ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
SeCOrTo web
|
||||||||||||||||||||||||||||
| Project |
SeCOrTo web
|
| Branch Review |
pull/78/head
|
| Run status |
|
| Run duration | 01m 35s |
| Commit |
|
| Committer | Sergio Orozco |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
6
|
| View all changes introduced in this branch ↗︎ | |
Contributor
There was a problem hiding this comment.
Pull request overview
Este PR simplifica el tipado en la suite de tests (unit y e2e) eliminando type assertions redundantes y apoyándose más en tipos inferidos y en languageKeys como fuente única de locales.
Changes:
- Eliminación de type assertions innecesarios en tests unitarios.
- Reemplazo de arreglos locales hardcodeados (
['es','en'] as const) porlanguageKeysen varios e2e tests. - Simplificación de casts redundantes en callbacks de
evaluate()y en llamadas de helpers tipados.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/utils/sectionContext.test.ts | Quita casts redundantes al usar helpers que ya retornan tipos explícitos. |
| tests/unit/i18n/utils.test.ts | Simplifica mocks removiendo as const donde no aporta valor en el test. |
| tests/e2e/titles/work.titles.spec.ts | Itera por languageKeys y elimina casts de locale/key al indexar ui. |
| tests/e2e/titles/project.titles.spec.ts | Igual que el anterior para la sección “project”. |
| tests/e2e/titles/community.titles.spec.ts | Igual que el anterior para la sección “community”. |
| tests/e2e/smoke/charla.spec.ts | Usa languageKeys y tipa expected fixtures con UILanguages directamente. |
| tests/e2e/main-page.spec.ts | Elimina casting intermedio y usa languageKeys directamente en el loop. |
| tests/e2e/footer.spec.ts | Reemplaza locales hardcodeados por languageKeys y elimina casts a UILanguages. |
| tests/e2e/color-switch.spec.ts | Elimina cast redundante en getComputedStyle() dentro de evaluate(). |
| tests/e2e/blog.list.spec.ts | Tipado explícito de fixtures y elimina cast redundante al navegar. |
| tests/e2e/a11y/charla.a11y.spec.ts | Usa languageKeys para ejecutar tests a11y por locale sin hardcodear. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Pull request
Removido type assertions que no agregan mucho valor en los test e2e y en unit