Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Bruno Predot
/
tmdb_test
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Bruno Predot
2025-04-29 19:14:36 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c96a4b1d825032890ac5523761dc35b1eb48a63d
c96a4b1d
1 parent
882f5b89
Ajout du fichier de test ScoreAndVote.spec.ts et de son premier test.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
CHANGELOG_RELEASE.md
test/components/ScoreAndVote.spec.ts
CHANGELOG_RELEASE.md
View file @
c96a4b1
------ Dispo à la prochaine release ------------
-
ajout fichier de test MovieGender.spec.ts.
\ No newline at end of file
-
ajout fichier de test MovieGender.spec.ts.
-
ajout fichier de test ScoreAndVote.spec.ts.
\ No newline at end of file
...
...
test/components/ScoreAndVote.spec.ts
0 → 100644
View file @
c96a4b1
//#region --Import--.
import
{
describe
,
expect
,
it
}
from
"vitest"
;
import
{
mount
}
from
"@vue/test-utils"
;
import
ScoreAndVote
from
"../../components/details/ScoreAndVote.vue"
;
//#endregion
describe
(
"ScoreAndVote"
,
()
=>
{
it
(
"affiche correctement le score"
,
()
=>
{
// Monter le composant avec ses props.
const
wrapper
=
mount
(
ScoreAndVote
,
{
props
:
{
score
:
7
,
nbVote
:
100
,
},
});
// Trouver l'élément qui contient le score.
const
scoreElement
=
wrapper
.
find
(
".bg-primary"
);
// Vérifier que le score est affiché correctement.
expect
(
scoreElement
.
text
()).
contain
(
"7"
);
});
});
...
...
Please
register
or
login
to post a comment