Skip to content

toMatch output is truncated #2791

@Shinigami92

Description

@Shinigami92

Describe the bug

While using e.g. toMatch the expected result is truncated even when setting outputTruncateLength to 1000

 FAIL  test/git.spec.ts > git > random seeded tests for seed 3694299162975756 > commitEntry > should return a valid random commitEntry
AssertionError: expected 'Author: Reynold71 <Reynold_Walsh57@ya…' to match /^Author: [\w_\. ]+ \<[\w\.]+@[\w\.]+\>$/
  test/git.spec.ts:62:30
     60|             expect(parts[5]).toMatch(/^\s{4}.+$/);
     61|           } else {
     62|             expect(parts[1]).toMatch(/^Author: [\w_\. ]+ \<[\w\.]+@[\w\.]+\>$/);
       |                              ^
     63|             expect(parts[2]).toMatch(/^Date: .+$/);
     64|             expect(parts[3]).toBe('');

It might be somewhat related to #2448
But there is no expected vs actual comparison/diff, so it's harder here to find the problem of the failing test

Reproduction

will add if really needed

System Info

System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 3.49 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
    npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Safari: 16.2
  npmPackages:
    @vitest/coverage-c8: ~0.28.3 => 0.28.3 
    @vitest/ui: ~0.28.3 => 0.28.3 
    vite: ~4.0.4 => 4.0.4 
    vitest: ~0.28.3 => 0.28.3

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions