Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch.spec.ts too strict #46

Open
duncdrum opened this issue Jul 29, 2021 · 0 comments
Open

branch.spec.ts too strict #46

duncdrum opened this issue Jul 29, 2021 · 0 comments

Comments

@duncdrum
Copy link

duncdrum commented Jul 29, 2021

1) branch
       only master branch after first commit:

      AssertionError: expected 'main' to equal 'master'
      + expected - actual

      -main
      +master
      
      at Object.<anonymous> (src/command/branch.spec.ts:60:45)
      at step (src/command/branch.spec.ts:32:23)
      at Object.next (src/command/branch.spec.ts:13:53)
      at fulfilled (src/command/branch.spec.ts:4:58)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

https://github.com/theia-ide/dugite-extra/blob/f7e9a1ab65ad60370d5dfbb3104b14e2db1c795d/src/command/branch.spec.ts#L55

with the switch to main as the default branch name, that test will fail on many systems. At a minimum either main or master should be acceptable. ultimately i m not yet sure why the name of the branch is checked here at all, as it is use configurable, so maybe the logic should be changed to actually test for any name to be returned or more in line with the description the total number of branches to be 1.

the same problem is repeated for https://github.com/theia-ide/dugite-extra/blob/f7e9a1ab65ad60370d5dfbb3104b14e2db1c795d/src/command/branch.spec.ts#L75
and
https://github.com/theia-ide/dugite-extra/blob/f7e9a1ab65ad60370d5dfbb3104b14e2db1c795d/src/command/branch.spec.ts#L91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant