Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a proof of concept of faster test integration. Rather than run a serve loop internally and watch it, this runs test completely separately. But I discovered that package:test has a --pub-serve= option. So we can run a
ddev serve
. separately, and run a test that just points at it. Except that it doesn't give us all the stuff we need. So we can make it duplicate what happens whenbuild_runner test
creates a merged directory. The advantage of that is that that merged directory takes e.g. almost 30 seconds to build for graph_ui. So this avoids any of that startup overhead and also runs nicely in a loop. It does accept test arguments, so you can restrict it to a subset of tests.So we run a
ddev serve
somewhere, and then run a trivial server that statically serves the current directory, the test sub-dir, and .dart_tool/build/generated/<package_name>, and also has a proxy to the ddev serve. And we spawn that and then just a simple shell loop that does adart run test
, waits for user input, and does it again.This is held together with string, but it does seem to work. Also, it's based off 3.7.0 because I was testing mostly against graph_ui, and didn't want to fight with newer deps.
Among the issues
x
, look fory
. There are tests in microfrontend that don't pass when run via ddev serve, so they don't pass this way either. I don't know why.