Skip to content

stylePreprocessorOptions not used for unit tests #8833

@probert94

Description

@probert94

Versions

Angular CLI: 1.6.0
Node: 8.5.0
OS: win32 x64
Angular: 5.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.0.0
@angular/cli: 1.6.0
@angular/flex-layout: 2.0.0-beta.10
@angular/material: 5.0.0
@angular-devkit/build-optimizer: 0.0.35
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.41
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.0
@schematics/angular: 0.1.10
@schematics/schematics: 0.0.10
typescript: 2.5.3
webpack: 3.10.0

Repro steps

  • Create a scss-partial in a folder styles, e.g. _variables.scss
  • Add styles to stylePreprocessorOptions.includePaths in .angular-cli.json.
  • Use this scss-partial in any *.component.scss-file, using @import "variables"

Observed behavior

Runing ng serve works as expected, running ng test fils with
File to import not found or unreadable: variables.

Desired behavior

The unit tests (ng test) should also use the setting and therefore be able to resolve the _variables.scss.

Mention any other details that might be useful (optional)

This has already been reported in #4200, but this issue has been closed in favor of #3605.
That issue in turn, has been closed in february, however it does not seem to be fixed or is broken again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentseverity3: broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions