Skip to content

Commit db6d289

Browse files
committed
chore(upgrade): infrastructure to allow running upgrade module specs
1 parent ec68074 commit db6d289

File tree

6 files changed

+38
-4
lines changed

6 files changed

+38
-4
lines changed

karma-js.conf.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ module.exports = function(config) {
1313
{pattern: 'dist/js/dev/es5/**', included: false, watched: false},
1414

1515
'node_modules/es6-shim/es6-shim.js',
16+
// include Angular v1 for upgrade module testing
17+
'node_modules/angular/angular.min.js',
1618

1719
// zone-microtask must be included first as it contains a Promise monkey patch
1820
'node_modules/zone.js/dist/zone-microtask.js',
1921
'node_modules/zone.js/dist/long-stack-trace-zone.js',
2022
'node_modules/zone.js/dist/jasmine-patch.js',
21-
23+
2224
// Including systemjs because it defines `__eval`, which produces correct stack traces.
2325
'modules/angular2/src/test_lib/shims_for_IE.js',
2426
'node_modules/systemjs/dist/system.src.js',
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import {
2+
AsyncTestCompleter,
3+
beforeEach,
4+
ddescribe,
5+
describe,
6+
expect,
7+
iit,
8+
inject,
9+
it,
10+
xdescribe,
11+
xit,
12+
} from 'angular2/test_lib';
13+
14+
15+
export function main() {
16+
describe('upgrade integration',
17+
() => { it('should run', () => { expect(angular.version.major).toBe(1); }); });
18+
}

modules/upgrade/tsd.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "v4",
3+
"repo": "angular/DefinitelyTyped",
4+
"ref": "master",
5+
"path": "typings",
6+
"bundle": "typings/tsd.d.ts",
7+
"installed": {
8+
"angularjs/angular.d.ts": {
9+
"commit": "746b9a892629060bc853e792afff536e0ec4655e"
10+
}
11+
}
12+
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"scripts": {
2626
"preinstall": "node tools/npm/check-node-modules --purge",
27-
"postinstall": "node tools/npm/copy-npm-shrinkwrap && node tools/chromedriverpatch.js && webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --overwrite --clean --config modules/angular2/tsd.json && tsd reinstall --overwrite --clean --config tools/tsd.json",
27+
"postinstall": "node tools/npm/copy-npm-shrinkwrap && node tools/chromedriverpatch.js && webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --overwrite --clean --config modules/angular2/tsd.json && tsd reinstall --overwrite --clean --config tools/tsd.json && tsd reinstall --overwrite --config modules/upgrade/tsd.json",
2828
"test": "gulp test.all.js && gulp test.all.dart"
2929
},
3030
"dependencies": {

test-main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ System.config({
1515
'angular2/*': 'dist/js/dev/es5/angular2/*.js',
1616
'angular2_material/*': 'dist/js/dev/es5/angular2_material/*.js',
1717
'rtts_assert/*': 'dist/js/dev/es5/rtts_assert/*.js',
18-
'@reactivex/rxjs/*': 'node_modules/@reactivex/rxjs/*.js'
18+
'@reactivex/rxjs/*': 'node_modules/@reactivex/rxjs/*.js',
19+
'upgrade/*': 'dist/js/dev/es5/upgrade/*.js'
1920
}
2021
});
2122

tools/broccoli/trees/dart_tree.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ var global_excludes = [
2020
'examples/src/http/**/*',
2121
'examples/test/http/**/*',
2222
'examples/src/jsonp/**/*',
23-
'examples/test/jsonp/**/*'
23+
'examples/test/jsonp/**/*',
24+
'upgrade/**/*'
2425
];
2526

2627

0 commit comments

Comments
 (0)