github-tools / github-tools/github
Failing 'Team should add membership for a given user' unit test
- Lenguaje dominante
- JavaScript
- Estrellas
- 3.8k
- Forks
- 809
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start with test/team.spec.js around line 166 and run npm test to reproduce the membership assertion. Compare the failing behavior with Travis build #608 and commit 46dd1d7c20b6fa686c47d4219a1aff0ca53e6ea0, then inspect how the test users, repositories, and organization membership are created. Done means identifying whether the failure is in the JavaScript wrapper or the GitHub test state and documenting a reproducible resolution.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- api, testing
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100