Repository navigation
fix: run test chains that never executed and await runUpdate in update - #731
Merged
Merged
Conversation
arjankowski
force-pushed
the
fix-tests-that-never-run
branch
from
October 23, 2026 11:19
f2ab91c to
d9e7cfc
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Coverage Report for CI Build 39964600876Coverage increased (+2.1%) to 87.047%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
antusus
reviewed
Oct 23, 2026
antusus
reviewed
Oct 23, 2026
antusus
reviewed
Oct 23, 2026
42 `@oclif/test` chains were nested inside mocha `it` blocks (via `await` or `return`) or had no `.it()`, so they were never scheduled and passed regardless of the code. Move them directly under `describe`, configure stubs in `.do()`, and fix assertions that surfaced once they ran: - read `stderr` instead of `stdout` for messages printed with `this.info` and errors handled by `BoxCommand.catch` - use a port supported by the Official Box CLI app in the login fallback test - accept unset `autoUpdate`/`force` flags as falsy in update tests - drop update channel tests; channel support was removed from the command The re-enabled update tests exposed two bugs in the `update` command: - `runUpdate` was not awaited, so a failed update surfaced as an unhandled promise rejection instead of going through oclif's error handling - `box update` crashed on Node 18 with `SyntaxError: Invalid regular expression flags`: `@oclif/table` >= 0.5.5 depends on `string-width@8`, which requires Node 20. Pin `@oclif/table` to 0.5.4 and import it only for `--available`.
…n test - parse `GithubUpdatecommand` instead of the plugin's `UpdateCommand`, so `box update stable` fails with "Unexpected argument" instead of silently ignoring the channel - bind the first free port from `SUPPORTED_DEFAULT_APP_PORTS` in the `--code` login test instead of hardcoding 4000 - document why `@oclif/table` is pinned to 0.5.4
arjankowski
force-pushed
the
fix-tests-that-never-run
branch
from
October 23, 2026 13:50
aaec1b7 to
f2c1a23
Compare
runUpdate in udaterunUpdate in update
congminh1254
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
42
@oclif/testchains were nested inside mochaitblocks (viaawaitorreturn) or had no.it(), so they were never scheduled and passed regardless of the code. Move them directly underdescribe, configure stubs in.do(), and fix assertions that surfaced once they ran:stderrinstead ofstdoutfor messages printed withthis.infoand errors handled byBoxCommand.catchautoUpdate/forceflags as falsy in update testsThe re-enabled update tests exposed two bugs in the
updatecommand:runUpdatewas not awaited, so a failed update surfaced as an unhandled promise rejection instead of going through oclif's error handlingbox updatecrashed on Node 18 withSyntaxError: Invalid regular expression flags:@oclif/table>= 0.5.5 depends onstring-width@8, which requires Node 20. Pin@oclif/tableto 0.5.4 and import it only for--available.