Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Improve tests #50

Merged
merged 5 commits into from
Jan 10, 2020
Merged

Improve tests #50

merged 5 commits into from
Jan 10, 2020

Conversation

florian-richter
Copy link
Contributor

Proposed Changes

In an effort to remove the rather large 'cli-ux' package, I refactored a bit and came across some minor bugs and possible improvements in the tests.

Checklist

  • I have added or adjusted tests that prove my fix is effective or that my feature works

conflicts.length > 1
? `Files with the names "${listOfFiles}" already exist. If you want to overwrite them, rerun the command with \`--force\`.`
: `A file with the name "${listOfFiles}" already exists. If you want to overwrite it, rerun the command with \`--force\`.`,
{ exit: 1 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the new version the findConflixts return {exit: 11} e.g. add-approuter line 43.

Copy link
Contributor

@FrankEssenberger FrankEssenberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear improvement from the old try catch in the test. One remark though: In the old way the setting of the exit code is part of the method itself. So if you call it N time in the code always the same error is created. Now the error code is set in the catch of the method call. I wonder if this is good from a consistency point of view.

@florian-richter florian-richter merged commit 0a4baeb into master Jan 10, 2020
@florian-richter florian-richter deleted the improve-tests branch January 10, 2020 13:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants