mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-48934 Migrate to @angular/build (#12098)
* AAE-48934 Migrate to @angular/build * cr * cr * fix watch issue * fix insights tests
This commit is contained in:
@@ -21,7 +21,7 @@ module.exports = function (config) {
|
||||
{ pattern: 'lib/config/app.config.json', included: false, served: true, watched: false }
|
||||
],
|
||||
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
frameworks: ['jasmine'],
|
||||
|
||||
proxies: {
|
||||
'/base/assets/': '/base/lib/insights/src/lib/assets/',
|
||||
@@ -29,13 +29,7 @@ module.exports = function (config) {
|
||||
'/app.config.json': '/base/lib/config/app.config.json'
|
||||
},
|
||||
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
plugins: [require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage')],
|
||||
client: {
|
||||
clearContext: false,
|
||||
jasmine: {
|
||||
@@ -72,7 +66,6 @@ module.exports = function (config) {
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: constants.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['ChromeHeadless'],
|
||||
singleRun: true
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"prefix": "adf",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@angular-devkit/build-angular:ng-packagr",
|
||||
"executor": "@angular/build:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "lib/insights/tsconfig.lib.json",
|
||||
"project": "lib/insights/ng-package.json"
|
||||
@@ -20,11 +20,12 @@
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"test": {
|
||||
"executor": "@angular-devkit/build-angular:karma",
|
||||
"executor": "@angular/build:karma",
|
||||
"options": {
|
||||
"main": "lib/insights/src/test.ts",
|
||||
"tsConfig": "lib/insights/tsconfig.spec.json",
|
||||
"karmaConfig": "lib/insights/karma.conf.js",
|
||||
"watch": false,
|
||||
"sourceMap": true,
|
||||
"codeCoverage": true,
|
||||
"stylePreprocessorOptions": {
|
||||
|
||||
@@ -21,8 +21,13 @@ import 'zone.js';
|
||||
import 'zone.js/testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
||||
import * as ChartJs from 'chart.js/auto';
|
||||
import Raphael from 'raphael';
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
||||
teardown: { destroyAfterEach: false }
|
||||
});
|
||||
|
||||
(window as any).Chart = (window as any).Chart || ChartJs.Chart;
|
||||
(window as any).Raphael = (window as any).Raphael || Raphael;
|
||||
|
||||
Reference in New Issue
Block a user