You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 20, 2024. It is now read-only.
Pre and post test hooks would be great in these cases
edit: A pre and post test suite hook would be helpful too. Specifically for docker containers, where we can spin them up and down, in addition to seeding them with example data (rather than the other hack of having the example data be added via the loader)
In some cases, it's necessary to initialize some tools / data before each test runs. From time to time, we will also need to provide some global setup for an adder, before running tests at all.
Let's implement something like this:
exportconsttests=defineAdderTests({
options,optionValues: [/* ... as usual */],files: [/* ... as usual */],preTestHook: ()=>{// will be run once, before starting tests for a specific adder.// can be used to start up docker, install global non npm tools etc.},postTestHook: ()=>{// will be run once, after finishing all tests for a specific adder.// shut down docker, uninstall global non npm tools etc.},tests: [/* ... as usual */],});
As far as I can tell right now, this introduces a new requirement. Tests for a specific adder cannot be run at the same time as tests for another adder. Let's assume we have two adders, drizzle and tauri. In that case we need to test all variations of drizzle first, and then start testing tauri. Executing them in parallel might cause side effects, so we need to avoid this.
Pre and post test hooks would be great in these cases
edit: A pre and post test suite hook would be helpful too. Specifically for docker containers, where we can spin them up and down, in addition to seeding them with example data (rather than the other hack of having the example data be added via the loader)
Originally posted by @AdrianGonz97 in #379 (comment)
The text was updated successfully, but these errors were encountered: