Sass file and font-awesome.css in the components broke unit test
emrep opened this issue · comments
I started requiring my Sass file and font-awesome.css in the components my unit tests broke. Would you help me how to solve it with my setup?
@Component({ selector: 'spring-boot-angular2', template: '<router-outlet></router-outlet>', styles: [require('../../node_modules/font-awesome/css/font-awesome.css'), require('../assets/sass/app.scss')], encapsulation: ViewEncapsulation.None }) export class AppComponent { name = 'spring-boot-angular2'; }
ERROR in ../src/assets/sass/app.scss
Module parse failed: D:\emrep\projects\blog-webpack\frontend\src\assets\sass\app.scss Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| @import "../bootstrap/variables.scss";
| @import "app-base.scss";
@ ../src/app/app.component.ts 1:5783-5817
@ ../src/app/app.spec.ts
@ ../src .spec.ts
@ ./spec-bundle.js
ERROR in ..//font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0/css-loader!../
Module parse failed: D:\emrep\projects\blog-webpack\frontend\node_modules\font-awesome\fonts\fontawesome-webfont.woff2?v=4.7.0 Unexpected character ' ' (1:4)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ..//font-awesome/css/font-awesome.css 6:479-532/font-awesome/css/font-awesome.css
@ ../
@ ../src/app/app.component.ts
@ ../src/app/app.spec.ts
@ ../src .spec.ts
@ ./spec-bundle.js