-
Notifications
You must be signed in to change notification settings - Fork 276
Update tests to match swapi.dev #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SWAPI returns 82 instead of 87 https://swapi.dev/api/people
There are 6 films https://swapi.dev/api/films/
* Language for https://swapi.dev/api/species/4 * `Wookie`
@@ -99,7 +99,7 @@ describe('Film type', async () => { | |||
'{ allFilms { edges { cursor, node { ...AllFilmProperties } } } }', | |||
); | |||
const result = await swapi(query); | |||
expect(result.data.allFilms.edges.length).to.equal(7); | |||
expect(result.data.allFilms.edges.length).to.equal(6); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you investigate why we have one less film?
It should be the opposite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please check if it related to #172 or happened for some other reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that there were only 6 movies in original too. I checked the data source file from swapi.co
This makes sense if we look at commit history of the file, Episode VII – The Force Awakens
was released in 2015 and the last time the owner update things was 6 years ago (2014) and didn’t really touched them (except to fix typos) so it makes sense since there were only 6 movies.
swapi.dev
has issue open Juriy/swapi#8 to update movies
species: { name: 'Human' }, | ||
species: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to Juriy/swapi#5
Tests assertion values were little out of sync from what SWAPI returned so updated those values.
Note: Use
yarn cover
to run tests becauseyarn test
fails at the moment because Flow is broken. Alsoyarn coveralls
isn't working and will fix it once we switch to NPM #180 and update deps