Skip to content

Tests in generator tests that don't return still pass #1

@dyoder

Description

@dyoder

This doesn't seem like it should happen, but I suspect it's related to the pending tests counter reaching zero incidentally. I suspect that reproducing this will require several tests to get the counter to zero.

Here's the test that isn't returning:

      context.test "read_block", ->
        {Readable} = require "stream"
        do (stream = new Readable) ->
          stream.push "one\n"
          stream.push "two\n"
          stream.push "three\n"
          _stream = lines stream
          assert (yield read_block _stream) == "one"
          assert (yield read_block _stream) == "two"
          assert (yield read_block _stream) == "three"

The second yield expression doesn't return because of a bug in read_block. We should try to reproduce this in isolation first, but, as I said, I think it's function of having multiple tests.

At any rate, in theory, the current design could allow the pending tests to reach zero. I originally thought this was impossible because the all the tests should increment the counter as soon as they begin running. But now I'm not so sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions