Expose option for using GitHub Checks#798
Conversation
4517e6a to
75bd23a
Compare
| const platform = new FakePlatform() | ||
|
|
||
| beforeEach(() => { | ||
| mockRunDangerSubprocess.mockReset() |
There was a problem hiding this comment.
Currently each assertion here is actually testing against the arguments passed into the first invocation of the danger runner, not the one that they've just performed.
| .option("-c, --external-ci-provider [modulePath]", "Specify custom CI provider") | ||
| .option("-p, --process [command]", "[dev] Runs a custom sub-process instead of the Danger JS runtime") | ||
| .option("-u, --passURLForDSL", "[dev] Use a custom URL to send the Danger DSL into the sub-process") | ||
| .option("--use-github-checks", "Use GitHub Checks", false) |
There was a problem hiding this comment.
Whaddayareckon?
I didn't dare try to come up with a single-character option for this.
| expect(executor.options.disableGitHubChecksSupport).toEqual(true) | ||
| }) | ||
|
|
||
| // TODO: This occasionally fails! |
There was a problem hiding this comment.
I suspect that this intermittency was caused by the failure to reset the mock but I didn't want to muddy up this PR with that change. If you concur with that assessment I'll raise a PR unskipping this after the mock resetting has landed. 🙂
There was a problem hiding this comment.
This makes sense to me - good thinking!
orta
left a comment
There was a problem hiding this comment.
Let's do it, I also don't have a better name, but I don't predict that too many folks will want to use checks after having used it for a while :D
| expect(executor.options.disableGitHubChecksSupport).toEqual(true) | ||
| }) | ||
|
|
||
| // TODO: This occasionally fails! |
There was a problem hiding this comment.
This makes sense to me - good thinking!
Closes #765