| commit | def41cc7b1960b32e6ac8aa22293ee4be1cc2c4c | [log] [tgz] |
|---|---|---|
| author | Nate Bosch <nbosch@google.com> | Mon Oct 23 15:42:03 2023 -0700 |
| committer | GitHub <noreply@github.com> | Mon Oct 23 15:42:03 2023 -0700 |
| tree | 0a85536f7ad927141a442a189939b7437a691e7e | |
| parent | f196d18c5b93509fc470527061a85d100ed4ba68 [diff] |
Tweak dart2js source map rewriting (#2128) - Remove a TODO referencing a closed issue. The issue was deduped to another which was closed without changes. Manual testing in a browser shows that the rewriting is still necessary. - Extract a variable for the source map path as a Uri instead of computing it within the loop. - Directly return URIs which are already `file://`. This would be a slight behavior change for the `runInBrowser.dart` synthetic source if it was ever put in the source map file with an absolute `file://` URI, but with the current (and apparently planned) dart2js output they do not have the file scheme. This is not a behavior change for any other cases where the source is a `file` URI, since it is no necessary to call `resolveUri` with an absolute path, and all `file` URI are absolute. - Refactor for readability - use a list literal, `Map.update`, and a `switch`. A sample run with a `Stopwatch` shows this reduces the non-IO overhead by about 75% (out of 165ms in my sample with multiple suites).
Welcome! package:test is the standard testing library for Dart and Flutter. If you have questions about Dart testing, please see the docs for package:test. package:test_api and package:test_core are implementation details and generally not user-facing.
package:checks is a relatively new library for expressing test expectations. It's a more modern version of package:matcher and features a literate API.
| Package | Description | Version |
|---|---|---|
| checks | A framework for checking values against expectations and building custom expectations. | |
| test | A full featured library for writing and running Dart tests across platforms. | |
| test_api | ||
| test_core |