test
test copied to clipboard
Web tests crash on load in 2.19 dev sdks
Originally this issue surfaced in the build repo, where we run regular tests against bleeding edge of the SDK.
Tried running normal web tests here as well (cd pkgs/test && dart compile js tool/host.dart -o lib/src/runner/browser/static/host.dart.js --minify -O0 && dart run test -p chrome --pause-after-load
) and I see the same problem.
The issue is in host.dart. It appears that the object we get back from Url.queryParameters
is not a Map as expected.
Note that I only see the issue here if the host.dart
file is recompiled. I am not sure exactly why package:build reproduces the issue without that, but maybe it is recompiling the host.dart
file automatically as a part of the build (although I am not aware of such behavior).
cc @joshualitt in case this is related to the static interop changes, also @rakudrama for general dart2js support.
I am getting "PlainJavascriptObject" as the runtime type of queryParameters
but I expect a map, this is the output when I added the following prints:
print(_currentUrl);
print(_currentUrl.queryParameters);
print(_currentUrl.queryParameters.runtimeType);
print(_currentUrl.queryParameters.keys);
print(_currentUrl.queryParameters.values);
print(_currentUrl.queryParameters.entries);
print(_currentUrl.queryParameters['debug']);
Note that we realized this also only reproduces if you pass --minify
and -O0
flags, which seems to suggest it is timing related.