Skip to content

Skip tests in AoT compilation process #3216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Serginho opened this issue Nov 21, 2016 · 6 comments
Closed

Skip tests in AoT compilation process #3216

Serginho opened this issue Nov 21, 2016 · 6 comments

Comments

@Serginho
Copy link

Serginho commented Nov 21, 2016

OS?

Ubuntu 16.04

Versions.

angular-cli: 1.0.0-beta.19-3
node: 4.6.0
os: linux x64

Repro steps.

Was this an app that wasn't created using the CLI? Yes

The log given by the failure.

›  $ ng build --prod --environment=dev --aot                  
                                                                                                  
  0% compiling
Cannot determine the module for class TestComponent in .../switch.component.spec.ts!
Cannot determine the module for class Test2Component in .../switch.component.spec.ts!
Cannot determine the module for class Test3Component in .../switch.component.spec.ts!

Mention any other details that might be useful.

I think it would be great to skip testing with AoT because Angular AoT compiler doesn't detect the test host components module. This class declaration is only configured in TestBed. For this reason AoT causes this exception.

@elvirdolic
Copy link

This is fixed in the latest version. Please upgrade!

@Serginho
Copy link
Author

Oh, that's true. Thanks.

@Serginho
Copy link
Author

Serginho commented Feb 15, 2017

I have the same problem with Beta-31

@angular/cli: 1.0.0-beta.31

node: 6.9.1
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7

@Serginho Serginho reopened this Feb 15, 2017
@hccampos
Copy link

@Serginho #4701

@filipesilva
Copy link
Contributor

Fixed in #4924

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants