x)- [ ] bug report -> please search issues before submitting
- [ x] feature request
@angular/cli: 1.1.2
node: 6.9.1
os: darwin x64
@angular/animations: 4.2.4
@angular/common: 4.2.4
@angular/compiler: 4.2.4
@angular/core: 4.2.4
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.2.4
@angular/http: 4.2.4
@angular/material: 2.0.0-beta.6
@angular/platform-browser: 4.2.4
@angular/platform-browser-dynamic: 4.2.4
@angular/router: 4.2.4
@angular/cli: 1.1.2
@angular/compiler-cli: 4.2.4
For a normal build all the styles from app.styles are preprocessed and included in the styles bundle. How can this bundle be generated and included also in tests (karma)?
Motivation to use styles in test: angular material requires a theme setup to work correctly/not outputting tons of warnings.
I understand the motivation for this feature, but it might be harder than it sounds like due to the way builds are done for tests. I'll look into it if I have the time.
any update on this?
Maybe I missed something, but the following works in my case.
karma.conf.js
module.exports = function (config) {
config.set({
...
files: [
'./tests/misc/styles.css'
],
...
});
};
Also, it could be a path similar to './node_modules/.../bootstrap.css'
Duplicate of https://github.com/angular/angular-cli/issues/11072 and solved by https://github.com/angular/angular-cli/pull/12371
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._
Most helpful comment
Maybe I missed something, but the following works in my case.
karma.conf.js
Also, it could be a path similar to './node_modules/.../bootstrap.css'