Skip to content

bug: single spec component test isnt working #6306

@womblep

Description

@womblep

Prerequisites

Stencil Version

v4.35.1

Current Behavior

npx stencil test --spec -- src/components/my-component/my-component.spec.ts

comes up with the error:
[35:21.5] @stencil/core
[35:21.8] v4.35.1

[ ERROR ] Testing requires either the --spec or --e2e command line flags, or both. For example, to run unit tests, use
the command: stencil test --spec

I took the command line from here https://stenciljs.com/docs/testing/stencil-testrunner/overview#command-line-arguments

Expected Behavior

It should run the spec test for that component

System Info

System: node 24.2.0
    Platform: windows (10.0.26100)
   CPU Model: AMD Ryzen 7 5800X 8-Core Processor              (16 cpus)
    Compiler: D:\RubymineProjects\SecureCall\sc-client-component\node_modules\@stencil\core\compiler\stencil.js
       Build: 1750123236
     Stencil: 4.35.1
  TypeScript: 5.5.4
      Rollup: 4.34.9
      Parse5: 7.2.1
      jQuery: 4.0.0-pre
      Terser: 5.37.0

Steps to Reproduce

It looks like any single component test fails

Code Reproduction URL

running npm init stencil@latest generates something that fails when using the command

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilHelp Wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions