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

Added required parameters. #370

Merged
merged 14 commits into from
Mar 16, 2018
Merged

Conversation

blackbaud-brandonhare
Copy link
Contributor

I'll update the tests, but I wanted to get some feedback on the implementation first. I'll also fix the formatting (I'm using prettier, thought I turned it off).

@codecov-io
Copy link

codecov-io commented Mar 13, 2018

Codecov Report

Merging #370 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
+ Coverage   99.24%   99.24%   +<.01%     
==========================================
  Files          73       73              
  Lines        1718     1729      +11     
  Branches      273      276       +3     
==========================================
+ Hits         1705     1716      +11     
  Misses         13       13
Flag Coverage Δ
#builder 100% <ø> (ø) ⬆️
#runtime 94.77% <100%> (+0.17%) ⬆️
#srcapp 100% <100%> (ø) ⬆️
Impacted Files Coverage Δ
src/app/app.component.ts 100% <100%> (ø) ⬆️
runtime/params.ts 100% <100%> (ø) ⬆️

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 5497b7e...09c308e. Read the comment docs.

return true;
}

return this.requiredParams.some((param: string) => {

Choose a reason for hiding this comment

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

Based on my understanding of some(), this would return true if there's at least one required param with a value. This would return a false positive in the case where there are more than one required parameters but at least one required parameter doesn't have a value. I see there's not a unit test that tests this scenario, so I'd like to see that test written as well as any necessary changes to this code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Swapped that to every, which is actually what we want. I've also added a test for that condition.

@Blackbaud-BobbyEarl Blackbaud-BobbyEarl merged commit cf79413 into master Mar 16, 2018
@Blackbaud-BobbyEarl Blackbaud-BobbyEarl deleted the feature-required-param branch March 16, 2018 16:47
Blackbaud-MikitaYankouski pushed a commit to Blackbaud-MikitaYankouski/skyux-builder that referenced this pull request May 3, 2019
* Added required parameters.

* Adding types.

* Added type.

* Fixed formatting.

* fixed formatting.

* Fixed space.

* Fixed formatting.

* Changes based on feedback.

* Fixed test.

* Fixed check for required params.
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.

4 participants