Skip to content

test task should honor scoped BATS args without also running full suite #25

Description

@zeke-ricon

While auditing modules for notes#58-style clobber hazards, I tried to run a scoped test command from a fresh clone:

mise run test -- test/init.bats test/update.bats

The task currently executes:

exec bats test/ "$@"

That means scoped test file arguments are appended after the full test/ directory, so BATS runs the full suite and then the requested files again. In my run it printed 1..109, duplicated the init/update tests, emitted BATS temp-dir collision errors like:

mkdir: .../bats-run-.../test/41: File exists
Failed to create BATS_TEST_TMPDIR1: .../test/41

A direct invocation worked:

MISE_CONFIG_ROOT="$PWD" bats test/init.bats test/update.bats
# 12/12 pass

Expected shape, matching notes' test task: if args are provided, run bats "$@"; otherwise run the full suite.

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