Open tripti825 opened 6 years ago
Load the global scss files
Not able to import global scss files which are imported in component's individual scss file; I have even used karma-scss-preprocessor
karma --version
Relevant part of your karma.config.js file
karma.config.js
module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), require('@angular-devkit/build-angular/plugins/karma'), require('karma-scss-preprocessor') ], client: { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { dir: require('path').join(__dirname, '../coverage'), reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false, files: [ {pattern: 'app///*/.scss', included: false}, {pattern: 'app///*.scss', included: false}, 'variables.scss' ], preprocessors: { 'variables.scss': ['scss'] } }); };
1.Please find rest of the details on this link -> https://stackoverflow.com/questions/51518004/not-able-to-load-on-karma-testing-a-scss-file-imported-in-a-components-scss
I suggest you try asking where folks talk about angular and scss.
Expected behaviour
Load the global scss files
Actual behaviour
Not able to import global scss files which are imported in component's individual scss file; I have even used karma-scss-preprocessor
Environment Details
karma --version
): 2.0.4Relevant part of your
karma.config.js
filemodule.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), require('@angular-devkit/build-angular/plugins/karma'), require('karma-scss-preprocessor') ], client: { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { dir: require('path').join(__dirname, '../coverage'), reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false, files: [ {pattern: 'app///*/.scss', included: false}, {pattern: 'app///*.scss', included: false}, 'variables.scss' ], preprocessors: { 'variables.scss': ['scss'] } }); };
Steps to reproduce the behaviour
1.Please find rest of the details on this link -> https://stackoverflow.com/questions/51518004/not-able-to-load-on-karma-testing-a-scss-file-imported-in-a-components-scss