Skip to content

fix(discovery): report syntax errors in candidate test files #23

Description

@cayasde

Reproduction

Create lutest.toml:

[discovery.lute]
require = "@lutest_release"
roots = ["src"]

Create src/broken.luau:

local t = require '@lutest_release'

t.test('has invalid syntax', function()
    assert(true)

Then run from the config directory:

lutest test --config lutest.toml
lutest todo --config lutest.toml

Actual behavior

  • test reports No test files found.
  • todo exits with code 0 and reports No todo tests.
  • test --dry-run reports zero files.

The syntax error is not shown in any of these paths.

Expected behavior

If static discovery sees a file that imports the configured Lutest library but cannot parse it, Lutest should surface a configuration or test-file parse error with the file path and parser details. It should not silently omit the file or let todo succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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