Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 001ffe3

Browse files
authored
build: update testing configuration (#793)
1 parent af0bc5b commit 001ffe3

File tree

5 files changed

+74
-79
lines changed

5 files changed

+74
-79
lines changed

scripts/saucelabs/start-tunnel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e -o pipefail
44

5-
TUNNEL_FILE="sc-4.4.9-linux.tar.gz"
5+
TUNNEL_FILE="sc-4.4.12-linux.tar.gz"
66
TUNNEL_URL="https://saucelabs.com/downloads/${TUNNEL_FILE}"
77
TUNNEL_DIR="/tmp/saucelabs-connect"
88

test/karma-system-config.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Configure the base path and map the different node packages.
2+
System.config({
3+
baseURL: '/base',
4+
paths: {
5+
'node:*': 'node_modules/*'
6+
},
7+
map: {
8+
'rxjs': 'node:rxjs',
9+
'tslib': 'node:tslib/tslib.js',
10+
11+
// Angular specific mappings.
12+
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
13+
'@angular/core/testing': 'node:@angular/core/bundles/core-testing.umd.js',
14+
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
15+
'@angular/common/testing': 'node:@angular/common/bundles/common-testing.umd.js',
16+
'@angular/common/http': 'node:@angular/common/bundles/common-http.umd.js',
17+
'@angular/common/http/testing': 'node:@angular/common/bundles/common-http-testing.umd.js',
18+
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
19+
'@angular/compiler/testing': 'node:@angular/compiler/bundles/compiler-testing.umd.js',
20+
'@angular/http': 'node:@angular/http/bundles/http.umd.js',
21+
'@angular/http/testing': 'node:@angular/http/bundles/http-testing.umd.js',
22+
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
23+
'@angular/forms/testing': 'node:@angular/forms/bundles/forms-testing.umd.js',
24+
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
25+
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
26+
'@angular/platform-browser/animations':
27+
'node:@angular/platform-browser/bundles/platform-browser-animations.umd',
28+
'@angular/platform-browser':
29+
'node:@angular/platform-browser/bundles/platform-browser.umd.js',
30+
'@angular/platform-browser/testing':
31+
'node:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
32+
'@angular/platform-browser-dynamic':
33+
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
34+
'@angular/platform-browser-dynamic/testing':
35+
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
36+
37+
'@angular/material/button': 'node:@angular/material/bundles/material-button.umd.js',
38+
'@angular/material/core': 'node:@angular/material/bundles/material-core.umd.js',
39+
'@angular/cdk': 'node:@angular/cdk/bundles/cdk.umd.js',
40+
'@angular/cdk/a11y': 'node:@angular/cdk/bundles/cdk-a11y.umd.js',
41+
'@angular/cdk/bidi': 'node:@angular/cdk/bundles/cdk-bidi.umd.js',
42+
'@angular/cdk/coercion': 'node:@angular/cdk/bundles/cdk-coercion.umd.js',
43+
'@angular/cdk/keycodes': 'node:@angular/cdk/bundles/cdk-keycodes.umd.js',
44+
'@angular/cdk/platform': 'node:@angular/cdk/bundles/cdk-platform.umd.js',
45+
46+
// Path mappings for local packages that can be imported inside of tests.
47+
'@angular/flex-layout': 'dist/packages/flex-layout/index.js',
48+
'@angular/flex-layout/core': 'dist/packages/flex-layout/core/index.js',
49+
'@angular/flex-layout/extended': 'dist/packages/flex-layout/extended/index.js',
50+
'@angular/flex-layout/flex': 'dist/packages/flex-layout/flex/index.js',
51+
'@angular/flex-layout/grid': 'dist/packages/flex-layout/grid/index.js',
52+
'@angular/flex-layout/server': 'dist/packages/flex-layout/server/index.js',
53+
},
54+
packages: {
55+
// Thirdparty barrels.
56+
'rxjs': {main: 'index'},
57+
'rxjs/operators': {main: 'index'},
58+
59+
// Set the default extension for the root package, because otherwise the demo-app can't
60+
// be built within the production mode. Due to missing file extensions.
61+
'.': {
62+
defaultExtension: 'js'
63+
}
64+
}
65+
});

test/karma-test-shim.js

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -9,75 +9,9 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
99

1010
__karma__.loaded = function () {};
1111

12-
var baseDir = '/base';
1312
var specFiles = Object.keys(window.__karma__.files).filter(isSpecFile);
1413

15-
// Configure the base path and map the different node packages.
16-
System.config({
17-
baseURL: baseDir,
18-
paths: {
19-
'node:*': 'node_modules/*'
20-
},
21-
map: {
22-
'rxjs': 'node:rxjs',
23-
'main': 'main.js',
24-
'tslib': 'node:tslib/tslib.js',
25-
26-
// Angular specific mappings.
27-
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
28-
'@angular/core/testing': 'node:@angular/core/bundles/core-testing.umd.js',
29-
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
30-
'@angular/common/testing': 'node:@angular/common/bundles/common-testing.umd.js',
31-
'@angular/common/http': 'node:@angular/common/bundles/common-http.umd.js',
32-
'@angular/common/http/testing': 'node:@angular/common/bundles/common-http-testing.umd.js',
33-
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
34-
'@angular/compiler/testing': 'node:@angular/compiler/bundles/compiler-testing.umd.js',
35-
'@angular/http': 'node:@angular/http/bundles/http.umd.js',
36-
'@angular/http/testing': 'node:@angular/http/bundles/http-testing.umd.js',
37-
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
38-
'@angular/forms/testing': 'node:@angular/forms/bundles/forms-testing.umd.js',
39-
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
40-
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
41-
'@angular/platform-browser/animations':
42-
'node:@angular/platform-browser/bundles/platform-browser-animations.umd',
43-
'@angular/platform-browser':
44-
'node:@angular/platform-browser/bundles/platform-browser.umd.js',
45-
'@angular/platform-browser/testing':
46-
'node:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
47-
'@angular/platform-browser-dynamic':
48-
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
49-
'@angular/platform-browser-dynamic/testing':
50-
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
51-
52-
'@angular/material/button': 'node:@angular/material/bundles/material-button.umd.js',
53-
'@angular/material/core': 'node:@angular/material/bundles/material-core.umd.js',
54-
'@angular/cdk': 'node:@angular/cdk/bundles/cdk.umd.js',
55-
'@angular/cdk/a11y': 'node:@angular/cdk/bundles/cdk-a11y.umd.js',
56-
'@angular/cdk/bidi': 'node:@angular/cdk/bundles/cdk-bidi.umd.js',
57-
'@angular/cdk/coercion': 'node:@angular/cdk/bundles/cdk-coercion.umd.js',
58-
'@angular/cdk/keycodes': 'node:@angular/cdk/bundles/cdk-keycodes.umd.js',
59-
'@angular/cdk/platform': 'node:@angular/cdk/bundles/cdk-platform.umd.js',
60-
61-
// Path mappings for local packages that can be imported inside of tests.
62-
'@angular/flex-layout': 'dist/packages/flex-layout/index.js',
63-
'@angular/flex-layout/core': 'dist/packages/flex-layout/core/index.js',
64-
'@angular/flex-layout/extended': 'dist/packages/flex-layout/extended/index.js',
65-
'@angular/flex-layout/flex': 'dist/packages/flex-layout/flex/index.js',
66-
'@angular/flex-layout/grid': 'dist/packages/flex-layout/grid/index.js',
67-
'@angular/flex-layout/server': 'dist/packages/flex-layout/server/index.js',
68-
},
69-
packages: {
70-
// Thirdparty barrels.
71-
'rxjs': {main: 'index'},
72-
'rxjs/operators': {main: 'index'},
73-
74-
// Set the default extension for the root package, because otherwise the demo-app can't
75-
// be built within the production mode. Due to missing file extensions.
76-
'.': {
77-
defaultExtension: 'js'
78-
}
79-
}
80-
});
14+
8115

8216
// Configure the Angular test bed and run all specs once configured.
8317
configureTestBed()

test/karma.conf.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,20 @@ module.exports = (config) => {
1616
require('karma-coverage'),
1717
],
1818
files: [
19-
{pattern: 'node_modules/core-js/client/core.js', included: true, watched: false},
19+
{pattern: 'node_modules/core-js/client/core.min.js', included: true, watched: false},
2020
{pattern: 'node_modules/tslib/tslib.js', included: true, watched: false},
21-
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false},
22-
{pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: false},
23-
{pattern: 'node_modules/zone.js/dist/proxy.js', included: true, watched: false},
21+
{pattern: 'node_modules/systemjs/dist/system.js', included: true, watched: false},
22+
{pattern: 'node_modules/zone.js/dist/zone.min.js', included: true, watched: false},
23+
{pattern: 'node_modules/zone.js/dist/proxy.min.js', included: true, watched: false},
2424
{pattern: 'node_modules/zone.js/dist/sync-test.js', included: true, watched: false},
25-
{pattern: 'node_modules/zone.js/dist/jasmine-patch.js', included: true, watched: false},
25+
{pattern: 'node_modules/zone.js/dist/jasmine-patch.min.js', included: true, watched: false},
2626
{pattern: 'node_modules/zone.js/dist/async-test.js', included: true, watched: false},
2727
{pattern: 'node_modules/zone.js/dist/fake-async-test.js', included: true, watched: false},
2828

2929
{pattern: 'node_modules/@angular/**/*', included: false, watched: false},
3030
{pattern: 'node_modules/rxjs/**/*', included: false, watched: false},
3131

32+
{pattern: 'test/karma-system-config.js', included: true, watched: false},
3233
{pattern: 'test/karma-test-shim.js', included: true, watched: false},
3334

3435

@@ -53,12 +54,8 @@ module.exports = (config) => {
5354
subdir: '.'
5455
},
5556

56-
specReporter: {
57-
maxLogLines: 1,
58-
},
59-
6057
sauceLabs: {
61-
testName: 'flex-layout',
58+
testName: 'Angular Layout Unit Tests',
6259
startConnect: false,
6360
recordVideo: false,
6461
recordScreenshots: false,

test/protractor.conf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const fs = require('fs');
21
const path = require('path');
32

43
// Load ts-node to be able to execute TypeScript files with protractor.

0 commit comments

Comments
 (0)