-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use and export parameterizeNamedList in nimble-angular #1735
Conversation
@m-akinc, will you buddy this for me? |
@@ -1,4 +1,4 @@ | |||
import { parameterize, parameterizeNamedList } from '../parameterized'; | |||
import { parameterize, parameterizeNamedList } from './parameterized'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec file should be in a tests folder so it's omitted from the build
/src/testing/tests/
@@ -3,6 +3,7 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testin | |||
import { Router } from '@angular/router'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed how the parameterize test helper could be useful in skyline as well and is maybe not good to expose via nimble-components or nimble-angular packages (it's a generic jasmine helper not tied to our components).
Directions discussed:
- Create a separate package in nimble, like @ni/jasmine-parameterized (which is similar to this public package except ours would be in the ni scope)
- Would need typescript compile and jasmine test set-up
- Would actually be neat to run it in node and and in browser, should be generic enough to, the typescript build would need to emit dist/esm and dist/cjs
- Copy and paste the utility to the @ni/nimble-angular/internal-utilities entry point so it isn't part of the publically supported api and make the package later in nimble or the js style guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to draft temporarily until a direction is picked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #1738, I am creating a new @ni/jasmine-parameterized package with these utilities. Once that PR is merged, I plan to update this PR to reference the new location of parameterizeNamedList
.
# Pull Request ## π€¨ Rationale This is part of #1551 Based on [this discussion](#1735 (comment)), we decided to create a new npm package for `jasmine-parameterized` rather than have it be exported from an existing nimble package. ## π©βπ» Implementation - Create a new package called `jasmine-parameterized` that contains the existing `parameterized.ts` and `tests\parameterized.spec.ts` - Add appropriate support files to build, lint, and test the package - Delete `parameterized.ts` and `tests\parameterized.spec.ts` from `nimble-components` - Update the tests in `nimble-components` to use `parameterizeSpec` from `jasmine-parameterized` ## π§ͺ Testing - Verified that the jasmine-parameterized tests are run in the pipeline - Verified that the jasmine-parameterized package contains the `dist` directory (without tests), `package.json`, and `README.md` - Verified all nimble-components tests still pass ## β Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Jesse Attas <[email protected]> Co-authored-by: rajsite <[email protected]>
I'm closing this PR in favor of #1768 |
Pull Request
π€¨ Rationale
Resolves #1551
π©βπ» Implementation
There were a few changes made here:
parameterizeNamedList
innimble-components
fromutilities/tests
totesting
to move it from a private directory to a directory that is intended to be publictesting
entry point in thenimble-angular
package that re-exports the parameterize utilitiesprocessUpdates
andwaitForUpdatesAsync
should ultimately be exported from the sametesting
entry point, but that hasn't been done yet since it is a breaking changeforEach
to loop through test cases to useparameterizeNamedList
insteadπ§ͺ Testing
Ran the tests and verified the same number of tests are still being run
β Checklist