github-tools / github-tools/github

Failing 'Team should add membership for a given user' unit test

未关闭
#431 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
3.8k
派生
809
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
api, testing
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。