Replies: 1 comment
-
Imho, the way how the plugins are load shall be managed by CodeceptJS. So I'm not sure how to handle this inside each individual plugin. Perhaps you could ask in the CodeceptJS forum to see if something similar has been resolved by someone. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've only barely scratched the surface with trying to extend or build a plugin for CodeceptJS; really have only read a little and looked at this projects code and maybe a bit of another plugin or two along with a tiny bit of how CodeceptJS runs. So with that in mind, is there anyway to make a plugin load asynchronously like they seem to have added with
bootstrap
andbootstrapAll
?I've begun to use some configuration or feature-flag services for some of my details to reduce the amount of static environment-based data points being maintained in custom .env files and so forth. However, I haven't found it easy to pre-fetch those details (an asynchronous operation) to then populate into the
codecept.conf.js
. When I try a direct input, the plugin fails because it's missing the relevant information. I've been able to work around it by modifying the plugin to populate the main object's details only during/after theevent.all.before
event fires. That event seems to be occurring after CodeceptJS'codecept.conf.js
file is consumed and then after thebootstrap
sections are executed but before all the testing actually kicks off.My solution works for my purposes at the moment, but I wanted to see if I'm missing a native mechanism in CodeceptJS or this plugin for asynchronously loading or if you wanted a PR to see what I've done so as to fit more appropriately into proper plugin definitions. My way feels kind of hacky and as I mentioned, I haven't really explored properly building plugins yet.
Beta Was this translation helpful? Give feedback.
All reactions