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

Buffered tests #309

Merged
merged 21 commits into from Jan 8, 2017
Merged

Buffered tests #309

merged 21 commits into from Jan 8, 2017

Conversation

isaacs
Copy link
Member

@isaacs isaacs commented Sep 6, 2016

Just a wip for #305. Do not land yet.

  • handle bailouts nicer (right now it's kind of noisy, better to just close the } and then bail out at top level, like with streaming subtests)
  • code is a bit kludgey, clean that up
  • unfinished tests need to get closed properly (right now it just exits uselessly)
  • support stdin as a buffered subtest
  • verify buffered fixture output in test/test.js
  • mark empty buffered tests (ie, with 1..0) as TODO, maybe?
  • bailOnFail should not bail out on tests with a { until the next thing at that indentation level, so that the bailout happens at the error, not before the actual error is printed.

@isaacs isaacs force-pushed the buffered-tests branch 5 times, most recently from 38712d5 to f00523d Compare September 12, 2016 19:02
@coveralls
Copy link

coveralls commented Sep 12, 2016

Coverage Status

Coverage decreased (-0.6%) to 93.703% when pulling f00523d on buffered-tests into d49c840 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 93.581% when pulling d5ef883 on buffered-tests into 81f08e3 on master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 93.581% when pulling d5ef883 on buffered-tests into 81f08e3 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 93.581% when pulling d5ef883 on buffered-tests into 81f08e3 on master.

This also updates to make buffered child bailouts less clunky
Juggling the alphabet is too hard as the number of tests and cases
increases.  Passing two booleans to a function feels like it should
probably be an options object, but whatever.  We can cross that bridge
later.

Also, this allows running a single case in an ad-hoc manner which is a
bit more convenient in development.
@coveralls
Copy link

coveralls commented Jan 3, 2017

Coverage Status

Coverage increased (+0.2%) to 93.581% when pulling 9ea5a52 on buffered-tests into 0c8b426 on master.

Simulates cases where the 'TAP_etc' environs aren't handled in any sort
of way in the child process test.

Particularly, the output for bail-on-failure and buffered parent when
the non-buffered non-bail-on-fail child has a failure midstream, is not
very ideal.  Printing the extra data is debatably valuable, but the fact
that it lists the test name as the bailout reason rather than the original
failure is very unfortunate.

Ideally, it'd be treated just like when a non-child-process test bails out.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 93.707% when pulling c40ed06 on buffered-tests into 0c8b426 on master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 93.707% when pulling c40ed06 on buffered-tests into 0c8b426 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 93.707% when pulling c40ed06 on buffered-tests into 0c8b426 on master.

@coveralls
Copy link

coveralls commented Jan 5, 2017

Coverage Status

Coverage increased (+0.2%) to 93.631% when pulling 2ed6355 on buffered-tests into 0c8b426 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 93.631% when pulling 2ed6355 on buffered-tests into 0c8b426 on master.

@coveralls
Copy link

coveralls commented Jan 5, 2017

Coverage Status

Coverage increased (+0.2%) to 93.631% when pulling 8aeb886 on buffered-tests into 0c8b426 on master.

Also, move the code around a little bit so that it'll be more
straightforward to have yaml diagnostics ahead of buffered child test
output once that's supported by the parser.
Otherwise it's pretty crowded and noisy.

However, to prevent double-spacing, also change some of the logic around
how and when subtest asserts get spaced (always putting a space after a
child test point).
@isaacs isaacs merged commit 60efe95 into master Jan 8, 2017
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