github-tools / github-tools/github
Failing 'Team should add membership for a given user' unit test
- Langage dominant
- JavaScript
- Étoiles
- 3.8k
- Forks
- 809
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I manged to fix all of the failing unit tests except for one. The 'Team should add membership for a given user' unit test is still failing with the following message:
```
1) Team should add membership for a given user:
AssertionError: "maintainer" must equal "member"
+ expected - actual
-maintainer
+member
at D:/Application_Dev_Workspaces/github/test/team.spec.js:166:29
at process._tickCallback (internal/process/next_tick.js:103:7)
```
I went back through the build history in Travis CI and found the last build in which all unit tests passed, which was [build #608](https://travis-ci.org/github-tools/github/builds/189248084) (about 2 months ago). I checked the commit for that build (which was 46dd1d7c20b6fa686c47d4219a1aff0ca53e6ea0), trying to see what had changed in the method under test, but it all seemed exactly the same to me. On a hunch, I checked out commit 46dd1d7c20b6fa686c47d4219a1aff0ca53e6ea0 on my local machine and tried running `npm test`. The 'Team should add membership for a given user' unit test still failed, even though I was using the exact same commit which passed the Travis CI build 2 months ago. To me, that suggests that the problem is not with the code of the library itself, but rather with something related to how the unit tests create test users and test repos in GitHub. Maybe GitHub changed something about how users get created by the API, or maybe the test user you created in GitHub in stuck in the wrong state in the test organization. I can't really do any more troubleshooting on my end, as I don't have administrative access to your test organization in GitHub to see what's happening from that end. Can you please look into this and see if you can find why this test which used to pass just fine is now failing, despite running the exact same code?
@clayreimann
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par test/team.spec.js vers la ligne 166 et exécutez npm test pour reproduire l’assertion d’appartenance. Comparez le comportement en échec avec le build Travis #608 et le commit 46dd1d7c20b6fa686c47d4219a1aff0ca53e6ea0, puis examinez comment sont créés les utilisateurs de test, les dépôts et l’appartenance à l’organisation. Le travail est terminé lorsqu’il est établi si l’échec se situe dans le wrapper JavaScript ou dans l’état de test GitHub, et qu’une résolution reproductible est documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- api, testing
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100