deno-cliffy
deno-cliffy copied to clipboard
fix: prompt/test/integration/number.ts - windows snapshot was out of date
Fix windows snapshot so tests pass.
Codecov Report
Merging #234 (7b23ef0) into main (a4943cb) will decrease coverage by
0.22%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #234 +/- ##
==========================================
- Coverage 73.38% 73.15% -0.23%
==========================================
Files 81 81
Lines 6218 6218
Branches 1061 1057 -4
==========================================
- Hits 4563 4549 -14
- Misses 1634 1645 +11
- Partials 21 24 +3
Impacted Files | Coverage Δ | |
---|---|---|
prompt/confirm.ts | 76.92% <0.00%> (-3.85%) |
:arrow_down: |
prompt/secret.ts | 75.86% <0.00%> (-3.45%) |
:arrow_down: |
prompt/_generic_prompt.ts | 76.32% <0.00%> (-3.39%) |
:arrow_down: |
prompt/checkbox.ts | 80.83% <0.00%> (-3.34%) |
:arrow_down: |
command/_utils.ts | 65.09% <0.00%> (-2.84%) |
:arrow_down: |
prompt/figures.ts | 94.44% <0.00%> (-2.78%) |
:arrow_down: |
ansi/ansi_escapes.ts | 94.54% <0.00%> (-1.82%) |
:arrow_down: |
flags/flags.ts | 48.25% <0.00%> (-1.75%) |
:arrow_down: |
prompt/select.ts | 87.30% <0.00%> (-1.59%) |
:arrow_down: |
flags/_utils.ts | 92.75% <0.00%> (-1.45%) |
:arrow_down: |
... and 9 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a4943cb...7b23ef0. Read the comment docs.
@sramam thx for the PR! Did you tested this locally on a windows machine? I aggree that the output should be 18 and not 19, but somehow the test outputs 19 on the github windows runner. If it work on your machine, than i think this is an issue with the integration test. Currently, i cannot test this on a windows machine because i'm not at home, but i can take a look tomorrow.
I did test on my machine.
Strange that the CI tests fail now! https://github.com/c4spar/deno-cliffy/pull/234/checks?check_run_id=2956699063
What does the --location
do in the CI tests?
I did try that too on my machine and it passes. (with the 18 that is)
hm, I think there is something wrong with the integration test. 18 looks wrong to me too, but it works on my mac with 18 too. I think this needs further investigation and I feel like there should be a lot more output. I think every time u
or d
is pressed a new line should be rendered but it looks like only on enter
a new line is rendered but then the output should be 21, 17 and 20 but that is not the case.
The --location
flag is only required for the local storage.
Could it be a function of running in headless mode?
Wdym with a function of running in headless mode
?
on the CI instance, there is no display. Perhaps the test behaves differently then? I do not know much about this, especially for windows, but have encountered some of these issues with ava in the past.
This is what a quick google search yielded and it's use in tests
Ah ok now I got what you mean. Yeah maybe, but I feel like there should be no difference in headless mode because I just read the output of stdout. But maybe there is really something different in headless mode. Will need to take a deeper look tomorrow my time.
Will need to take a deeper look tomorrow my time.
Absolutely. Thanks for the wonderful library and being so responsive.
I will close this PR because i can not reproduce this on my windows machine and ci is working as well. if this issue still persists feel free to reopen.