From 77fa3c3e4858f90e53805ea0a71076082ce3ee4d Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 10 Aug 2017 06:28:43 +0300 Subject: [PATCH] test(aio): fix tests for example-boilerplate (#18619) PR #18520 was accidentally merged into 4.3.x, which uses a different location for building `tsc-wrapped`. This commit reverts the changes from #18520 that were not compatible with 4.3.x. --- aio/tools/examples/example-boilerplate.js | 8 ++++++-- aio/tools/examples/example-boilerplate.spec.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/aio/tools/examples/example-boilerplate.js b/aio/tools/examples/example-boilerplate.js index bc8944025a..96deb66d12 100644 --- a/aio/tools/examples/example-boilerplate.js +++ b/aio/tools/examples/example-boilerplate.js @@ -41,9 +41,12 @@ const ANGULAR_PACKAGES = [ 'platform-browser-dynamic', 'platform-server', 'router', - 'tsc-wrapped', 'upgrade', ]; +const ANGULAR_TOOLS_PACKAGES_PATH = path.resolve(ANGULAR_DIST_PATH, 'tools', '@angular'); +const ANGULAR_TOOLS_PACKAGES = [ + 'tsc-wrapped' +]; const EXAMPLE_CONFIG_FILENAME = 'example-config.json'; @@ -60,6 +63,7 @@ class ExampleBoilerPlate { // Replace the Angular packages with those from the dist folder, if necessary if (useLocal) { ANGULAR_PACKAGES.forEach(packageName => this.overridePackage(ANGULAR_PACKAGES_PATH, packageName)); + ANGULAR_TOOLS_PACKAGES.forEach(packageName => this.overridePackage(ANGULAR_TOOLS_PACKAGES_PATH, packageName)); } // Get all the examples folders, indicated by those that contain a `example-config.json` file @@ -133,4 +137,4 @@ module.exports = new ExampleBoilerPlate(); // If this file was run directly then run the main function, if (require.main === module) { module.exports.main(); -} \ No newline at end of file +} diff --git a/aio/tools/examples/example-boilerplate.spec.js b/aio/tools/examples/example-boilerplate.spec.js index b983e86558..3dcd18015f 100644 --- a/aio/tools/examples/example-boilerplate.spec.js +++ b/aio/tools/examples/example-boilerplate.spec.js @@ -32,7 +32,7 @@ describe('example-boilerplate tool', () => { // for example expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledWith(path.resolve(__dirname, '../../../dist/packages-dist'), 'common'); expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledWith(path.resolve(__dirname, '../../../dist/packages-dist'), 'core'); - expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledWith(path.resolve(__dirname, '../../../dist/packages-dist'), 'tsc-wrapped'); + expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledWith(path.resolve(__dirname, '../../../dist/tools/@angular'), 'tsc-wrapped'); }); it('should process all the example folders', () => {