Skip to content

--clearScreen not accepted as CLI argument #5185

@paularmstrong

Description

@paularmstrong

Describe the bug

Expected Vite's --clearScreen=false argument to be accepted by Vitest (not just in the config)

Reproduction

npx vitest --clearScreen=false

file:///…/node_modules/cac/dist/index.mjs:400
          throw new CACError(`Unknown option \`${name.length > 1 ? `--${name}` : `-${name}`}\``);
                ^

CACError: Unknown option `--clearScreen`
    at Command.checkUnknownOptions (file:///…/node_modules/cac/dist/index.mjs:400:17)
    at CAC.runMatchedCommand (file:///…/node_modules/cac/dist/index.mjs:598:13)
    at CAC.parse (file:///…/node_modules/cac/dist/index.mjs:537:12)
    at file:///…/node_modules/vitest/dist/cli.js:72:7
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async main (file:///…/node_modules/vitest/dist/cli-wrapper.js:45:5)

Node.js v20.11.0

System Info

n/a

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    Status

    Approved

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions