Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 0fdf8a9

Browse files
committed
fix unit tests
1 parent 59fd50d commit 0fdf8a9

File tree

8 files changed

+11
-32
lines changed

8 files changed

+11
-32
lines changed

public/docs/_examples/testing/ts/karma-test-shim.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing.
88
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
99

1010
// builtPaths: root paths for output ("built") files
11-
// get from karma.config.js, then prefix with '/base/' (default is 'app/')
12-
var builtPaths = (__karma__.config.builtPaths || ['app/'])
11+
// get from karma.config.js, then prefix with '/src/' (default is 'app/')
12+
var builtPaths = (__karma__.config.builtPaths || ['src/'])
1313
.map(function(p) { return '/base/'+p;});
1414

1515
__karma__.loaded = function () { };
@@ -35,7 +35,7 @@ var allSpecFiles = Object.keys(window.__karma__.files)
3535
.filter(isBuiltFile);
3636

3737
System.config({
38-
baseURL: 'base',
38+
baseURL: 'base/src',
3939
// Extend usual application package list with testing folder
4040
packages: { 'testing': { main: 'index.js', defaultExtension: 'js' } },
4141

public/docs/_examples/testing/ts/karma.conf.js

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// #docregion
22
module.exports = function(config) {
33

4-
var appBase = 'app/'; // transpiled app JS and map files
5-
var appSrcBase = 'app/'; // app source TS files
4+
var appBase = 'src/'; // transpiled app JS and map files
65
var appAssets = '/base/app/'; // component assets fetched by Angular's compiler
76

87
// Testing helpers (optional) are conventionally in a folder called `testing`
9-
var testingBase = 'testing/'; // transpiled test JS and map files
10-
var testingSrcBase = 'testing/'; // test source TS files
8+
var testingBase = 'src/testing/'; // transpiled test JS and map files
9+
var testingSrcBase = 'src/testing/'; // test source TS files
1110

1211
config.set({
1312
basePath: '',
@@ -58,8 +57,8 @@ module.exports = function(config) {
5857
{ pattern: 'node_modules/@angular/**/*.js', included: false, watched: false },
5958
{ pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false },
6059

61-
{ pattern: 'systemjs.config.js', included: false, watched: false },
62-
{ pattern: 'systemjs.config.extras.js', included: false, watched: false },
60+
{ pattern: appBase + '/systemjs.config.js', included: false, watched: false },
61+
{ pattern: appBase + '/systemjs.config.extras.js', included: false, watched: false },
6362
'karma-test-shim.js', // optionally extend SystemJS mapping e.g., with barrels
6463

6564
// transpiled application & spec code paths loaded via module imports
@@ -73,16 +72,16 @@ module.exports = function(config) {
7372
{ pattern: appBase + '**/*.css', included: false, watched: true },
7473

7574
// Paths for debugging with source maps in dev tools
76-
{ pattern: appSrcBase + '**/*.ts', included: false, watched: false },
75+
{ pattern: appBase + '**/*.ts', included: false, watched: false },
7776
{ pattern: appBase + '**/*.js.map', included: false, watched: false },
7877
{ pattern: testingSrcBase + '**/*.ts', included: false, watched: false },
7978
{ pattern: testingBase + '**/*.js.map', included: false, watched: false}
8079
],
8180

8281
// Proxied base paths for loading assets
8382
proxies: {
84-
// required for component assets fetched by Angular's compiler
85-
"/app/": appAssets
83+
// required for modules fetched by SystemJS
84+
'/base/src/node_modules/': '/base/node_modules/'
8685
},
8786

8887
exclude: [],

public/docs/_examples/testing/ts/systemjs.config.extras.js

-9
This file was deleted.

public/docs/_examples/testing/ts/systemjs.config.extras.web.js

-11
This file was deleted.

0 commit comments

Comments
 (0)