Skip to content

Commit

Permalink
fix: update NgModuleWithProviders interface
Browse files Browse the repository at this point in the history
build: base for angular 10 e2e tests

fix: remove dependency on interface from angular

fix: change names in the index.html files

fix: do not inject APP_INITIALIZER token for version 10

fix: add helper constant testBedInjector

fix: compile Ivy dependencies for parallel test predictability

build: move testBedInjector into utils folder

fix: remove unused imports

fix: explicitly cast inject method as any for Angular 5

fix: cast TestBed to any instead of the key value

fix: cast mock to any
  • Loading branch information
vytautas-petrikas committed Jun 30, 2020
1 parent a86ff0b commit b1a81b1
Show file tree
Hide file tree
Showing 69 changed files with 36,609 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
/e2e/angular8/node_modules
/e2e/angular9-ivy-false/node_modules
/e2e/angular9-ivy-true/node_modules
/e2e/angular10-ivy-false/node_modules
/e2e/angular10-ivy-true/node_modules
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ cache:
- e2e/angular8/node_modules
- e2e/angular9-ivy-false/node_modules
- e2e/angular9-ivy-true/node_modules
- e2e/angular10-ivy-false/node_modules
- e2e/angular10-ivy-true/node_modules
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ VOLUME /app/e2e/angular7/node_modules
VOLUME /app/e2e/angular8/node_modules
VOLUME /app/e2e/angular9-ivy-false/node_modules
VOLUME /app/e2e/angular9-ivy-true/node_modules
VOLUME /app/e2e/angular10-ivy-false/node_modules
VOLUME /app/e2e/angular10-ivy-true/node_modules

RUN npm config set cache /npm --global

Expand Down
3 changes: 2 additions & 1 deletion build-with-supported-angluars.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
VERSIONS="5 6 7 8 9"
VERSIONS="5 6 7 8 9 10"
PACKAGES="animations common compiler core forms platform-browser platform-browser-dynamic router"

for version in $VERSIONS
Expand All @@ -19,6 +19,7 @@ do
echo $version | grep -Eq "^7" && NEW="$NEW rxjs@6.0.0 zone.js@0.8.26 typescript@3.1"
echo $version | grep -Eq "^8" && NEW="$NEW rxjs@6.4.0 zone.js@0.9.1 typescript@3.4.3"
echo $version | grep -Eq "^9" && NEW="$NEW rxjs@6.5.3 zone.js@0.10.2 typescript@3.6.4"
echo $version | grep -Eq "^10" && NEW="$NEW rxjs@6.5.5 zone.js@0.10.3 typescript@3.9.5"

echo $NEW

Expand Down
11 changes: 11 additions & 0 deletions e2e/angular10-ivy-false/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
2 changes: 2 additions & 0 deletions e2e/angular10-ivy-false/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/src/test
21 changes: 21 additions & 0 deletions e2e/angular10-ivy-false/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Michael G.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
109 changes: 109 additions & 0 deletions e2e/angular10-ivy-false/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"app": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "app:build"
},
"configurations": {
"production": {
"browserTarget": "app:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
}
}
},
"ngrx-entity-relations": {
"projectType": "library",
"root": "ngrx-entity-relations",
"sourceRoot": "src"
}
},
"defaultProject": "ngrx-entity-relations",
"cli": {
"analytics": false
}
}
12 changes: 12 additions & 0 deletions e2e/angular10-ivy-false/browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
40 changes: 40 additions & 0 deletions e2e/angular10-ivy-false/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-chrome-launcher'),
require('karma-coverage-istanbul-reporter'),
require('karma-ie-launcher'),
require('karma-jasmine'),
require('karma-jasmine-html-reporter'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/app'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
},
customLaunchers: {
ChromeCi: {
base: 'ChromeHeadless',
flags: ['--headless', '--disable-gpu', '--no-sandbox', '--disable-dev-shm-usage'],
},
},
reporters: ['kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['ChromeCi'],
singleRun: true,
});
};
Loading

0 comments on commit b1a81b1

Please sign in to comment.