-
Notifications
You must be signed in to change notification settings - Fork 12k
ng test and two source folders #6371
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
Comments
Can you please provide some steps to reproduce this issue? Ideally this would be via a github repo. |
Hi,
here the repo: https://github.com/netTrek/angular-cli-issues
Repro steps.
* create new projekt with cli
* edit tsconfig to work with two source folders
"paths": {
"@modules/": [ "../@modules/" ]
}
* Use a Component from the second Source-Folder
* use new karma test context for both folder
const context = require.context('../', true, //(@modules<https://github.com/modules>|src)/./..spec.ts$/);
* run 'ng test'
Warm regards
…___
Saban Ünlü
Von: Mike Brocchi <[email protected]>
Antworten an: angular/angular-cli <[email protected]>
Datum: Donnerstag, 18. Mai 2017 um 19:23
An: angular/angular-cli <[email protected]>
Cc: "[email protected]" <[email protected]>, Author <[email protected]>
Betreff: Re: [angular/angular-cli] ng test and two source folders (#6371)
Can you please provide some steps to reproduce this issue? Ideally this would be via a github repo.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#6371 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJhm8noFjyP6Uz5dJl9xqQmhIstyZVDtks5r7H6IgaJpZM4Nfb8A>.
|
In my case it works, when I move die @modules folder inside die src folder. |
@netTrek we don't directly support that usecase and there's a fair number of things that can go wrong with it from a setup point of view. There's some limited support for multiple apps (https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/multiple-apps.md), but currently no support for libraries (#1692). |
I should mention that with |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.0.3
node: 7.5.0
os: darwin x64
macOS (Sierra?)
Repro steps.
"paths": {
"@modules/": [ "../@modules/" ]
}
const context = require.context('../', true, //(@modules|src)/./..spec.ts$/);
The log given by the failure.
I’m working with two source folders. Therefore I have implemented the context, in order that tests will be searched in two folders.
const context = require.context('../', true, //(@modules|src)/./..spec.ts$/);
If I’m starting ng test, only tests from src run. If I start the test again through a watcher, all tests are found. It is crazy, that an abort with „Error in“ comes with the third reload and with the fourth reload everything is found again and running. These two conditions repeat with every other reload. Can I use ng test only with every „straight“ run reliably? Could be difficult to define in my Jenkins environment.
BTW: Whenever the tests are not in the default source folder. No tests will be found
see http://stackoverflow.com/questions/44047895/karma-finds-no-test-files-on-start-but-finds-every-file-when-reloading/44052076#44052076 also.
Desired functionality.
All test-files should be found
Mention any other details that might be useful.
THX Saban
The text was updated successfully, but these errors were encountered: