chore(testing): export stubComponentCompilerMeta as mockComponentMeta#6409
Conversation
|
@Cliffback - the pipeline is failing atm. Mind having a look? 🙏 |
|
Hmm... Stuggling to make the tests pass. I get this currently:
but if i add the export to
But the function is already bundled, and works fine in actual use, so seems to be just a type issue Any suggestions, @johnjenkins? |
|
not off the top of my head. I would think however, it probably makes most sense if this object can instead be exported from the stencil/core/testing dir (e.g from |
Yeah. Like moving the stub-file from its current location, and into the mocks-file, and rewriting internal references to it in Stencil, or working with the bundler to keep its location but then include it in |
Option 1 I think? Obvs don't know if there are any wider repercussions to that |
I'll give it a go! For the API, does it make sense to export the |
|
@johnjenkins I think it actually was as simple as not just reexporting, but explicitly importing and exporting on different lines. I at least managed to pass the failing command locally. Perhaps restart the workflow to see if it passes now? |
I think |
Aside from formatting / linting it looks happier! |
Aggreed
Awesome. Will fix linting and rename to |
|
@johnjenkins Should be good now. Is PR title okay? |
:D - |
|
Sorry, forgot to run prettier as well, should be updated now. |



For being able to mock the compiler for testing custom output targets, the
stubComponentCompilerMetais very useful. Up until now, I have just copied the object, while exporting it from Stencil would be much better.stencil-custom-suffix-output-target
So with this export, I can now just import the object like this directly:

Instead of manually hardcoding it like I currently do:
custom-suffix-output-target.spec-utils.ts