Skip to content

FastCompile is skipping components defined in tests #2360

@ThiloAschebrock

Description

@ThiloAschebrock

Please provide the environment you discovered this bug in.

I have been trying to switch on the new fastCompile flag for testing of an existing Angular application with vite-plugin-angular.

Which area/package is the issue in?

vite-plugin-angular

Description

After the fix in #2344, I am now running into another remaining issue ReferenceError whenever one is defining an Angular wrapper component within the test file directly. This is useful to, e.g., define a host component to test directives.

It seems that components defined in the test files directly are not compiled.

Please provide the exception or error you saw

Error: Failed to import ../example.component.spec.ts
Caused by: ReferenceError: TestComponent is not defined

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    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