Closed rexxars closed 8 years ago
Could you change a spec changes (removing a brackets) and this feature?
I didn't quite catch that... Could you elaborate?
I removed the curly brackets from the tests because the operation is now async, and the run
method now returns a promise, which makes ava automatically finish the tests once the promise is resolved or rejected.
Ouh :(.
BTW, what is your user case?
We are building a dynamic role-based plugin system for one of our products, where plugins are able to provide variables for styling the application. When resolving the final values of the variables, we need to resolve all the plugins that fulfill a given role, load the plugins and merge the results of all these together. The process involves touching the filesystem quite a lot, which is why doing it asynchronously makes sense.
I afraid that it makes plugin to complicated. Maybe you should do it in separated plugin?
This PR adds support for asynchronously resolving the variable values. I had a pretty particular case where I need this, but I suppose it may be helpful to others as well. Let me know if you want anything changed - I couldn't quite make out the code style.