-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add suitePath getter #2281
base: master
Are you sure you want to change the base?
Conversation
5f3d0d6
to
c1614be
Compare
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. Package publish validation ✔️
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
@matanlurey would you be able to put together a prototype of your intended usage so we can confirm whether this solves the problem? |
This is only meant to solve the original problem stated in #110, which is getting the path to the test script. It does not help with getting access to the package root, but |
Does this get impacted by changes to the working directory? |
Probably, although I don't know for sure. But, that is partially why I like just exposing the relative suite path. We can be out of the business of the rest of it, which isn't really in our control. We can provide suggestions with caveats (like using Uri.base), which will work for most, but we don't guarantee them or support them directly. |
Possible resolution to #110.
Adds a
suitePath
getter which gives the package relative path to the current suite if it is available.Uri.base
already actually contains the full path including the suite, so you don't want to use this there which is a bit weird. On the VM you want to do something likeUri.base.resolve(suitePath).resolve(<some-suite-relative-path>)
.<base>
tag to the html page, setting it to be the package root.I also expanded the test coverage in
test_api
to VM/chrome and all compilers, just to ensure this works everywhere.