Skip to content

Error showing trace for failing test #30

@juanibiapina

Description

@juanibiapina

Hi, this looks like a really interesting project! It could be what I've been looking for to test completions for a CLI. For now though, I can't show traces of failing tests:

test file:

import { test, expect } from "@microsoft/tui-test";

test.use({ shell: "bash" });

test("ls test", async ({ terminal }) => {
  terminal.submit("ls");

  await expect(terminal.getByText("not there", { full: true })).toBeVisible();
});

This test fails, and then when trying to show the trace:

> tui-test show-trace tui-traces/test-main.test.js-ls-test

node:internal/process/promises:391
    triggerUncaughtException(err, true /* fromPromise */);
    ^

Error: unexpected end of file
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at Zlib.zlibOnError [as onerror] (node:zlib:191:17) {
  errno: -5,
  code: 'Z_BUF_ERROR'
}

Node.js v20.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions