diff --git a/karma-js.conf.js b/karma-js.conf.js index 275c95c8ca..8332c1c5ed 100644 --- a/karma-js.conf.js +++ b/karma-js.conf.js @@ -13,12 +13,14 @@ module.exports = function(config) { {pattern: 'dist/js/dev/es5/**', included: false, watched: false}, 'node_modules/es6-shim/es6-shim.js', + // include Angular v1 for upgrade module testing + 'node_modules/angular/angular.min.js', // zone-microtask must be included first as it contains a Promise monkey patch 'node_modules/zone.js/dist/zone-microtask.js', 'node_modules/zone.js/dist/long-stack-trace-zone.js', 'node_modules/zone.js/dist/jasmine-patch.js', - + // Including systemjs because it defines `__eval`, which produces correct stack traces. 'modules/angular2/src/test_lib/shims_for_IE.js', 'node_modules/systemjs/dist/system.src.js', diff --git a/modules/upgrade/test/integration_spec.ts b/modules/upgrade/test/integration_spec.ts new file mode 100644 index 0000000000..aa98548f88 --- /dev/null +++ b/modules/upgrade/test/integration_spec.ts @@ -0,0 +1,18 @@ +import { + AsyncTestCompleter, + beforeEach, + ddescribe, + describe, + expect, + iit, + inject, + it, + xdescribe, + xit, +} from 'angular2/test_lib'; + + +export function main() { + describe('upgrade integration', + () => { it('should run', () => { expect(angular.version.major).toBe(1); }); }); +} diff --git a/modules/upgrade/tsd.json b/modules/upgrade/tsd.json new file mode 100644 index 0000000000..481137d5eb --- /dev/null +++ b/modules/upgrade/tsd.json @@ -0,0 +1,12 @@ +{ + "version": "v4", + "repo": "angular/DefinitelyTyped", + "ref": "master", + "path": "typings", + "bundle": "typings/tsd.d.ts", + "installed": { + "angularjs/angular.d.ts": { + "commit": "746b9a892629060bc853e792afff536e0ec4655e" + } + } +} diff --git a/package.json b/package.json index f7f2221d7e..6bf4c78fa9 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "scripts": { "preinstall": "node tools/npm/check-node-modules --purge", - "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", + "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", "test": "gulp test.all.js && gulp test.all.dart" }, "dependencies": { diff --git a/test-main.js b/test-main.js index ca3172e528..ad9559f769 100644 --- a/test-main.js +++ b/test-main.js @@ -15,7 +15,8 @@ System.config({ 'angular2/*': 'dist/js/dev/es5/angular2/*.js', 'angular2_material/*': 'dist/js/dev/es5/angular2_material/*.js', 'rtts_assert/*': 'dist/js/dev/es5/rtts_assert/*.js', - '@reactivex/rxjs/*': 'node_modules/@reactivex/rxjs/*.js' + '@reactivex/rxjs/*': 'node_modules/@reactivex/rxjs/*.js', + 'upgrade/*': 'dist/js/dev/es5/upgrade/*.js' } }); diff --git a/tools/broccoli/trees/dart_tree.ts b/tools/broccoli/trees/dart_tree.ts index bc794740fb..efd98b8607 100644 --- a/tools/broccoli/trees/dart_tree.ts +++ b/tools/broccoli/trees/dart_tree.ts @@ -20,7 +20,8 @@ var global_excludes = [ 'examples/src/http/**/*', 'examples/test/http/**/*', 'examples/src/jsonp/**/*', - 'examples/test/jsonp/**/*' + 'examples/test/jsonp/**/*', + 'upgrade/**/*' ];