Skip to content

Ergonomic API for isolating tests written for package:test #262

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

Closed
yjbanov opened this issue Jun 18, 2015 · 5 comments
Closed

Ergonomic API for isolating tests written for package:test #262

yjbanov opened this issue Jun 18, 2015 · 5 comments

Comments

@yjbanov
Copy link
Member

yjbanov commented Jun 18, 2015

Problem

package:test no longer provides a good way to isolate tests right from the test code itself (dart-lang/test#127)

Proposal

  • Add new library package:quiver/testing/unit.dart, which has
    • itest - isolates one test
    • igroup - isolates a group of tests
  • The library also reexports package:test/test.dart so that
    • users only need to import one thing
    • it serves as a drop-in replacement for the underlying package
@zoechi
Copy link

zoechi commented Jun 18, 2015

I don't think it's a good idea to add this to quiver. test adds a lot of dependencies (like shelf, polymer, ... https://github.com/dart-lang/test/blob/master/pubspec.yaml) and if you want to use quiver as normal dependency (not dev_dependency) you add all these dependencies to your package and all users of your package. I think there should be a new package created for this purpose.

@justinfagnani
Copy link
Contributor

I agree, this doesn't seem like something to add to Quiver. From the issue on test it sounds like enabling a more opinionated runner based on tags, and/or wrapping test is one of their design goals, so it would be perfectly inline with that to start that as it's own package.

@yjbanov
Copy link
Member Author

yjbanov commented Jun 18, 2015

@zoechi I'm not yet sure if it's possible, but if we can keep package:test a dev_dependency of quiver, then you wouldn't automatically pull in package:test with pub get if you depend on quiver.

@justinfagnani We already plan making package:quiver/testing its own package. I don't think it matters if we add these utilities before or after the split.

Note that this proposal does not include a new test runner, only a handful of useful functions. You would still use normal pub run test to run your tests.

@zoechi
Copy link

zoechi commented Jun 19, 2015

@yjbanov I guess not. If it is a dev_dependency it is only available for development of quiver (test/, tool/, example/) and must not be used in code in lib/. and therefore isn't available to packages depending on quiver.

@cbracken
Copy link
Member

cbracken commented Nov 5, 2019

Closing this out as we have no plans to implement this in quiver.

@cbracken cbracken closed this as completed Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants