I think something isn't setup right yet, it only works for DDC.
hmm we have a basic e2e test to verify this works, what issues are you seeing?
Unable to find a _browser_test file. Let me try and get a repro!
[INFO] CreateOutputDir: Creating merged output dir `/var/folders/bn/dtrksvvs32j6004mk6r0dcdw007b7h/T/build_runner_testW0WjDj/` completed, took 1.3s
[INFO] CreateOutputDir: Writing asset manifest completed, took 1ms
[INFO] Build: Succeeded after 28.0s with 526 outputs
Running tests...
00:00 +0: compiling test/di/tree_bindings_reflective_test.dart
00:00 +0 -1: compiling test/di/tree_bindings_directive_test.dart [E]
Failed to load "test/di/tree_bindings_directive_test.dart": Failed to load script at http://localhost:53765/CaTnFWBkXLE0NT7j1gj3omj0O2ycOVq3/test/di/tree_bindings_directive_test.dart.browser_test.dart.js.
00:00 +0 -2: compiling test/di/20_bindings_reflective_test.dart [E]
Failed to load "test/di/20_bindings_reflective_test.dart": Failed to load script at http://localhost:53765/CaTnFWBkXLE0NT7j1gj3omj0O2ycOVq3/test/di/20_bindings_reflective_test.dart.browser_test.dart.js.
00:00 +0 -3: compiling test/di/20_bindings_directive_test.dart [E]
Failed to load "test/di/20_bindings_directive_test.dart": Failed to load script at http://localhost:53765/CaTnFWBkXLE0NT7j1gj3omj0O2ycOVq3/test/di/20_bindings_directive_test.dart.browser_test.dart.js.
00:00 +0 -4: compiling test/di/tree_bindings_reflective_test.dart [E]
Failed to load "test/di/tree_bindings_reflective_test.dart": Failed to load script at http://localhost:53765/CaTnFWBkXLE0NT7j1gj3omj0O2ycOVq3/test/di/tree_bindings_reflective_test.dart.browser_test.dart.js.
00:00 +0 -5: compiling test/bootstrap_test.dart [E]
Failed to load "test/bootstrap_test.dart": Failed to load script at http://localhost:53765/CaTnFWBkXLE0NT7j1gj3omj0O2ycOVq3/test/bootstrap_test.dart.browser_test.dart.js.
00:00 +0 -5: Some tests failed.
Can I see your build.yaml?
NO (Yes).
targets:
$default:
builders:
build_web_compilers|entrypoint:
generate_for:
- web/**.dart
options:
compiler: dart2js
dart2js_args:
- --fast-startup
- --minify
- --trust-type-annotations
- --trust-primitives
And if you swap to dartdevc it works?
Oh wait, I think you just need a - test/**.dart addition to generate_for?
Good question.
I wonder if this is a similar problem as one of my earlier bugs, where it kills the default configuration (including test bootstrapping) by having custom configuration.
Oh wait, I think you just need a
- test/**.dartaddition togenerate_for?
DOH. Let me try that.
... and that worked. I'm a silly. Anything we should document here?
Not sure if there is anything easy we could do in terms of an error message here - we could search for _test.dart files and make sure there is a .dart.browser_test.dart.js file but that seems like overkill... wdyt?
this only comes up if you have custom build.yaml config, but I think because we don't have defaults around the js compiler today that might be more common than we would want.
That's true. Let's close this for now, thanks!
Most helpful comment
Oh wait, I think you just need a
- test/**.dartaddition togenerate_for?