Balrog994 / cucumber-test-runner

An Extension for Visual Studio Code to Run and Debug CucumberJS Tests
MIT License
5 stars 8 forks source link

Test runner stuck if Before/After hooks is being used #10

Closed janyangyuan closed 1 year ago

janyangyuan commented 1 year ago

In the latest version v0.5.0, it seems like the test run will stuck if we use Before/After hooks

image

I saw the following error in debug console when the test run stuck:

Error: EPIPE: broken pipe, write
    at Socket._write (node:internal/net:61:25)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Socket.Writable.write (node:internal/streams/writable:337:10)
    at Console.value (node:internal/console/constructor:300:16)
    at Console.warn (node:internal/console/constructor:382:26)
    at ConsoleLogger.error (c:\Workspace\PlaygroundCucumber\node_modules\@cucumber\cucumber\src\api\console_logger.ts:16:18)
    at Socket.<anonymous> (c:\Workspace\PlaygroundCucumber\node_modules\@cucumber\cucumber\src\api\formatters.ts:42:14)
    at Socket.emit (node:events:513:28)
    at Socket.emit (node:domain:489:12)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4047,
  syscall: 'write',
  code: 'EPIPE'
}

You can find my repo for the example: https://github.com/janyangyuan/playground-cucumber It works fine if I comment the Before/After functions and move all the codes to Given/When/Then, so I guess the Before/After hooks break the test-runner.

Balrog994 commented 1 year ago

Thanks for the report, I'll check it as soon as possible :)