mgechev / angular-seed

🌱 [Deprecated] Extensible, reliable, modular, PWA ready starter project for Angular (2 and beyond) with statically typed build and AoT compilation
https://mgechev.github.io/angular-seed
MIT License
4.57k stars 1.45k forks source link

Tests failing when using SCSS #1983

Closed Flood closed 7 years ago

Flood commented 7 years ago

I'm submitting a ... (check one with "x")

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see use [gitter](https://gitter.im/mgechev/angular2-seed) or [stackoverflow](https://stackoverflow.com/questions/tagged/angular2)

I am trying to run the tests and it fails with

FAILED TESTS:
  App component
    × should build without a problem
      Chrome 58.0.3029 (Windows 10 0.0.0)
    Failed: Uncaught (in promise): Failed to load dist/dev/scss/colors
    Error: Uncaught (in promise): Failed to load dist/dev/scss/colors
        at resolvePromise (node_modules/zone.js/dist/zone.js:710:31) [ProxyZone]
        at resolvePromise (node_modules/zone.js/dist/zone.js:681:17) [ProxyZone]
        at node_modules/zone.js/dist/zone.js:758:17 [ProxyZone]
        at ProxyZoneSpec.onInvokeTask (node_modules/zone.js/dist/proxy.js:103:39) [ProxyZone]
        at drainMicroTaskQueue (node_modules/zone.js/dist/zone.js:591:35) [<root>]
        at XMLHttpRequest.ZoneTask.invoke (node_modules/zone.js/dist/zone.js:464:25) [<root>]

I have been investigating this and can't find a solution. The solution fixed here https://github.com/mgechev/angular-seed/pull/1091 does not exist anymore. There is no inlineNg2Template in build.js.test.ts anymore.

Anyone that is using SCSS and have successful tests? The dev and prod build works, but not the test.

Karasuni commented 7 years ago

I can't reproduce your issue.

Following the guide I created a branch you can find here. No errors were reported in any of the build steps.

It looks like you're improperly importing colors.scss.

mgechev commented 7 years ago

@Karasuni thanks for the comment.

Flood commented 7 years ago

I found the error, I had a component that had /*@import "../../scss/colors";*/ and that row was compiled to dev folder somehow. Removed the comment and it works.