ngx-formly unit test with TestComponent

464 Views Asked by At

I want to unit test ngx-formly code (I understand that things are quite fresh when it comes to ngx-formly testing).

I would like to reuse the pattern used in the unit tests of ngx-formly itself, such as https://github.com/ngx-formly/ngx-formly/blob/v5/src/material/select/src/select.spec.ts

it relies on things like TestComponent declared here : https://github.com/ngx-formly/ngx-formly/blob/60bece9b9dd4e1719bb6cdf3e49d804453438fb3/src/core/src/lib/services/formly.config.spec.ts and createGenericTestComponent declared here : https://github.com/ngx-formly/ngx-formly/blob/fee312de5b8a2bd18d069129b0af778497c5159f/src/core/src/lib/test-utils.ts

but those things do not seems to be exposed. Is there a way for me to use them for my tests ? Is there way to write tests following this pattern or am I in a completely wrong approach ?

0

There are 0 best solutions below