Skip to content
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

refactor: vastly simplify guinness2 by removing all context. #8

Merged
merged 1 commit into from
Feb 11, 2016

Conversation

juliemr
Copy link
Owner

@juliemr juliemr commented Feb 11, 2016

Almost everything that guinness does to keep track of suites
and tests is now also handles by package test. So, instead
of keeping tons of complex logic around, simply defer
to package:test functions when possible.

BREAKING CHANGE:

iit and ddescribe NO LONGER modify which tests will run. Instead,
they will mark those blocks with the tag "solo". To run only
iit or ddescribe blocks, use the command line
pub run test --tags solo (the same command you would use before,
with the additional tags "solo").

See #1

@@ -1,28 +1,34 @@
part of guinness2;

void beforeEach(Function fn, {int priority: 0}) =>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably a good idea to deprecate or remove this priority parameter, since test doesn't support it.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that! Done.

@nex3
Copy link

nex3 commented Feb 11, 2016

Based on my limited knowledge of Guiness, this looks good. A couple larger-scale things that occurred to me:

  • It may be worth taking this opportunity to make the matchers more in line with package:matcher, although maybe that's not worth the effort.
  • Once you've figured out how you want this to look, I'd suggest returning to the package name guinness. It's unlikely that people will want to use v1 and v2 at the same time, and it always sucks to have a 2 on the end of package names later down the line when version 1 is long gone.
  • I generally like to write integration tests in Dart, invoking processes with dart:io or scheduled_test and verifying their output. That may be easier in the long-term than having to run them via a shell script.

Almost everything that guinness does to keep track of suites
and tests is now also handles by package test. So, instead
of keeping tons of complex logic around, simply defer
to package:test functions when possible.

BREAKING CHANGE:

`iit` and `ddescribe` NO LONGER modify which tests will run. Instead,
they will mark those blocks with the tag "solo". To run only
`iit` or `ddescribe` blocks, use the command line
`pub run test --tags solo` (the same command you would use before,
with the additional tags "solo").

See #1
@juliemr
Copy link
Owner Author

juliemr commented Feb 11, 2016

Thanks for taking a look!

Re: matchers - I think that it could make sense to use that as a backend at some point, but agree that this is probably not worth the effort, since the immediate goal is to make them just work with angular2.

I'll talk with victor about merging this back in to guinness without any numbers at the end.

And yeah, if I update the integration tests again I'll definitely move away from just shell scripts.

@juliemr juliemr merged commit fcb4a64 into master Feb 11, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants