File tree Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 11## 1.27.1-wip
22
3+ * Bump ` test_core ` to 0.6.14
34* Removed unused ` js ` dependency
45
56## 1.27.0
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ dependencies:
3636
3737 # Use an exact version until the test_api and test_core package are stable.
3838 test_api : 0.7.8
39- test_core : 0.6.13
39+ test_core : 0.6.14
4040
4141 typed_data : ^1.3.0
4242 web_socket_channel : ' >=2.0.0 <4.0.0'
Original file line number Diff line number Diff line change 1+ ## 0.6.14
2+
3+ * Fix type cast when parsing a ` null ` hit map.
4+
15## 0.6.13
26
37* Require Dart 3.7
Original file line number Diff line number Diff line change @@ -30,7 +30,16 @@ Future<Coverage> writeCoverage(
3030 await out.flush ();
3131 await out.close ();
3232 }
33- return HitMap .parseJson (coverage['coverage' ] as List <Map <String , dynamic >>);
33+ return switch (coverage['coverage' ]) {
34+ // Matching on `List<dynamic>` the runtime type of `List` in JSON is
35+ // never `Map<String, dynamic>`. The `cast` below ensures the runtime type
36+ // is correct for `HitMap.parseJson`.
37+ List <dynamic > hitMapJson => HitMap .parseJson (
38+ hitMapJson.cast <Map <String , dynamic >>(),
39+ ),
40+ null => const {},
41+ _ => throw StateError ('Invalid coverage data' ),
42+ };
3443}
3544
3645Future <void > writeCoverageLcov (
Original file line number Diff line number Diff line change 11name : test_core
2- version : 0.6.13
2+ version : 0.6.14
33description : A basic library for writing tests and running them on the VM.
44repository : https://github.com/dart-lang/test/tree/master/pkgs/test_core
55issue_tracker : https://github.com/dart-lang/test/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atest
You can’t perform that action at this time.
0 commit comments