Skip to content

Better error messages #4011

@basickarl

Description

@basickarl

Clear and concise description of the problem

Currently when an issue arises inside a test the error message receives give no information as to which test failed. So manually having to comment every test one by one until the issue is found is time consuming.

One line of code caused the following:

 FAIL  __tests__/table/tables.test.tsx [ __tests__/table/tables.test.tsx ]
Error: Missing "./src/table" specifier in "@neo4j-ndl/react" package
 ❯ e ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:21420:25
 ❯ n ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:21420:627
 ❯ o ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:21420:1297
 ❯ resolveExportsOrImports ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:28712:20
 ❯ resolveDeepImport ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:28731:31
 ❯ tryNodeResolve ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:28419:20
 ❯ Context.resolveId ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:28180:28
 ❯ Object.resolveId ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:44207:64
 ❯ TransformContext.resolve ../../node_modules/vitest/node_modules/vite/dist/node/chunks/dep-df561101.js:43923:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

 Test Files  1 failed (1)
      Tests  no tests
   Start at  20:59:09
   Duration  4.84s (transform 1.43s, setup 141ms, collect 0ms, tests 0ms, environment 387ms, prepare 130ms)

Very frustrating. At least give the line where the issue arose.

Suggested solution

Tell us which test has the code which is faulty. Preferably the line in the file.

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-haveNot breaking anything but nice to have (priority)

    Type

    No type

    Projects

    Status

    Has plan

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions