chore(01): step 1 - get pokemon by name#1
Open
fabernovel-fnguyen wants to merge 4 commits intomainfrom
Open
Conversation
| it('findPokemonByNameOrFail - valid pokemon name', async () => { | ||
| const pokemonName = 'bulbasaur'; | ||
| const pokemonStats = | ||
| await pokemonService.findPokemonByNameOrFail(pokemonName); |
There was a problem hiding this comment.
Ce qu'on fait dans nos tests, c'est l'écriture Gherkin
On pourrait faire ça ici, ça donnerait pour ce test:
it('findPokemonByNameOrFail - valid pokemon name', async () => {
// Given
const pokemonName = 'bulbasaur';
// When
const pokemonStats =
await pokemonService.findPokemonByNameOrFail(pokemonName);
// Then
expect(pokemonStats).toMatchObject({
id: 1,
name: 'bulbasaur',
species: {
name: 'bulbasaur',
url: 'https://pokeapi.co/api/v2/pokemon-species/1/',
},
types: ['grass', 'poison'],
weight: 69,
height: 7,
});
});
Collaborator
Author
There was a problem hiding this comment.
Appliqué aux tests unitaires
There was a problem hiding this comment.
Bon, donc on a mit un message sur slack 😄
Tu disais que ce serait mieux aussi de l'appliquer aux e2e 👍
michaelantounfabernovel
approved these changes
Mar 10, 2025
1816f00 to
1d7c9b0
Compare
michaelantounfabernovel
approved these changes
Mar 17, 2025
477e4b7 to
4ddeff3
Compare
4ddeff3 to
93cecd0
Compare
added 2 commits
June 23, 2025 14:40
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.
No description provided.