Repository: ember-cli/ember-cli
Pull request #7742 (2018-04-07 17:53:20)

Package Javascript
This change is related to the [spike](https://github.com/ember-cli/ember-cli/pull/7562) and is backwards compatible. To avoid making changes to `ember-app` in one go, we can move processing/packaging logic (one tree at a time) to `DefaultPackager` while adding tests/documentation and deprecating private undocumented methods.

twokul: CI is red b/c of https://github.com/ember-cli/ember-cli/pull/7747

Patch:
diff --git a/lib/broccoli/default-packager.js b/lib/broccoli/default-packager.js
index 295241df4..8067b8e1e 100644
--- a/lib/broccoli/default-packager.js
+++ b/lib/broccoli/default-packager.js
@@ -2,6 +2,7 @@
 
 const p = require('ember-cli-preprocess-registry/preprocessors');
 const path = require('path');
+const concat = require('broccoli-concat');
 const Funnel = require('broccoli-funnel');
 const mergeTrees = require('./merge-trees');
 const ConfigLoader = require('broccoli-config-loader');
@@ -12,6 +13,58 @@ const preprocessJs = p.preprocessJs;
 const DEFAULT_BOWER_PATH = 'bower_components';
 const DEFAULT_VENDOR_PATH = 'vendor';
 
+/*
+  Creates an object with lists of files to be concatenated into `vendor.js` file.
+
+  Given a map that looks like:
+
+  ```
+  {
+    'assets/vendor.js': [
+      'vendor/ember-cli-shims/app-shims.js',
+      'vendor/loader/loader.js',
+      'vendor/ember-resolver/legacy-shims.js',
+      ...
+    ]
+  }
+  ```
+
+  Produces an object that looks like:
+
+  ```
+  {
+    headerFiles: [
+     'vendor/ember-cli/vendor-prefix.js',
+     'vendor/loader/loader.js',
+     'vendor/ember/jquery/jquery.js',
+     'vendor/ember/ember.debug.js',
+     'vendor/ember-cli-shims/app-shims.js',
+     'vendor/ember-resolver/legacy-shims.js'
+    ],
+    inputFiles: [
+      'addon-tree-output/**\/*.js'
+    ],
+    footerFiles: [
+      'vendor/ember-cli/vendor-suffix.js'
+    ],
+    annotation: 'Vendor JS'
+  }
+  ```
+
+  @private
+  @method getVendorFiles
+  @param {Object} files A list of files to include into `<file-name>.js`
+  @param {Boolean} isMainVendorFile Boolean flag to indicate if we are dealing with `vendor.js` file
+  @return {Object} An object with lists of files to be concatenated into `vendor.js` file.
+ */
+function getVendorFiles(files, isMainVendorFile) {
+  return {
+    headerFiles: files,
+    inputFiles: isMainVendorFile ? ['addon-tree-output/**/*.js'] : [],
+    footerFiles: isMainVendorFile ? ['vendor/ember-cli/vendor-suffix.js'] : [],
+  };
+}
+
 /**
  * Responsible for packaging Ember.js application.
  *
@@ -25,6 +78,7 @@ module.exports = class DefaultPackager {
     this._cachedVendor = null;
     this._cachedPublic = null;
     this._cachedConfig = null;
+    this._cachedJavascript = null;
 
     this.options = options || {};
 
@@ -32,6 +86,9 @@ module.exports = class DefaultPackager {
     this.name = this.options.name;
     this.project = this.options.project;
     this.registry = this.options.registry;
+    this.sourcemaps = this.options.sourcemaps;
+    this.distPaths = this.options.distPaths;
+    this.scriptOutputFiles = this.options.scriptOutputFiles;
   }
 
   /*
@@ -258,4 +315,202 @@ module.exports = class DefaultPackager {
 
     return this._cachedConfig;
   }
+
+  /*
+   * Concatenates all javascript Broccoli trees into one, as follows:
+   *
+   * Given an input tree that looks like:
+   *
+   * ```
+   * addon-tree-output/
+   *   ember-ajax/
+   *   ember-data/
+   *   ember-engines/
+   *   ember-resolver/
+   *   ...
+   * bower_components/
+   *   usertiming/
+   *   sinonjs/
+   *   ...
+   * the-best-app-ever/
+   *   components/
+   *   config/
+   *   helpers/
+   *   routes/
+   *   ...
+   * vendor/
+   *   ...
+   *   babel-core/
+   *   ...
+   *   broccoli-concat/
+   *   ...
+   *   ember-cli-template-lint/
+   *   ...
+   * ```
+   *
+   * Returns:
+   *
+   * ```
+   * assets/
+   *   the-best-app-ever.js
+   *   the-best-app-ever.map (if sourcemaps are enabled)
+   *   vendor.js
+   *   vendor.map (if sourcemaps are enabled)
+   * ```
+   *
+   * @private
+   * @method packageJavascript
+   * @return {BroccoliTree}
+  */
+  packageJavascript(tree) {
+    if (this._cachedJavascript === null) {
+      let appJs = this.packageApplicationJs(tree);
+      let vendorJs = this.packageVendorJs(tree);
+
+      this._cachedJavascript = mergeTrees([appJs, vendorJs], {
+        overwrite: true,
+        annotation: 'Packaged Javascript',
+      });
+    }
+
+    return this._cachedJavascript;
+  }
+
+  /*
+   * Concatenates all application's javascript Broccoli trees into one, as follows:
+   *
+   * Given an input tree that looks like:
+   *
+   * ```
+   * addon-tree-output/
+   *   ember-ajax/
+   *   ember-data/
+   *   ember-engines/
+   *   ember-resolver/
+   *   ...
+   * bower_components/
+   *   usertiming/
+   *   sinonjs/
+   *   ...
+   * the-best-app-ever/
+   *   components/
+   *   config/
+   *   helpers/
+   *   routes/
+   *   ...
+   * vendor/
+   *   ...
+   *   babel-core/
+   *   ...
+   *   broccoli-concat/
+   *   ...
+   *   ember-cli-template-lint/
+   *   ...
+   * ```
+   *
+   * Returns:
+   *
+   * ```
+   * assets/
+   *   the-best-app-ever.js
+   *   the-best-app-ever.map (if sourcemaps are enabled)
+   * ```
+   *
+   * @private
+   * @method packageApplicationJs
+   * @return {BroccoliTree}
+  */
+  packageApplicationJs(tree) {
+    let inputFiles = [`${this.name}/**/*.js`];
+    let headerFiles = [
+      'vendor/ember-cli/app-prefix.js',
+    ];
+    let footerFiles = [
+      'vendor/ember-cli/app-suffix.js',
+      'vendor/ember-cli/app-config.js',
+      'vendor/ember-cli/app-boot.js',
+    ];
+
+    return concat(tree, {
+      inputFiles,
+      headerFiles,
+      footerFiles,
+      outputFile: this.distPaths.appJsFile,
+      annotation: 'Packaged Application Javascript',
+      separator: '\n;',
+      sourceMapConfig: this.sourcemaps,
+    });
+  }
+
+  /*
+   * Concatenates all application's vendor javascript Broccoli trees into one, as follows:
+   *
+   * Given an input tree that looks like:
+   * ```
+   * addon-tree-output/
+   *   ember-ajax/
+   *   ember-data/
+   *   ember-engines/
+   *   ember-resolver/
+   *   ...
+   * bower_components/
+   *   usertiming/
+   *   sinonjs/
+   *   ...
+   * the-best-app-ever/
+   *   components/
+   *   config/
+   *   helpers/
+   *   routes/
+   *   ...
+   * vendor/
+   *   ...
+   *   babel-core/
+   *   ...
+   *   broccoli-concat/
+   *   ...
+   *   ember-cli-template-lint/
+   *   ...
+   * ```
+   *
+   * Returns:
+   *
+   * ```
+   * assets/
+   *   vendor.js
+   *   vendor.map (if sourcemaps are enabled)
+   * ```
+   *
+   * @method packageVendorJs
+   * @param {BroccoliTree} tree
+   * @return {BroccoliTree}
+  */
+  packageVendorJs(tree) {
+    let importPaths = Object.keys(this.scriptOutputFiles);
+
+    // iterate over the keys and create N strategies
+    // to support scenarios like
+    // app.import('vendor/foobar.js', { outputFile: 'assets/baz.js' });
+    let vendorTrees = importPaths.map(importPath => {
+      let files = this.scriptOutputFiles[importPath];
+      let isMainVendorFile = importPath === this.distPaths.vendorJsFile;
+
+      const vendorObject = getVendorFiles(files, isMainVendorFile);
+
+      return concat(tree, {
+        inputFiles: vendorObject.inputFiles,
+        headerFiles: vendorObject.headerFiles,
+        footerFiles: vendorObject.footerFiles,
+        outputFile: importPath,
+        annotation: `Package ${importPath}`,
+        separator: '\n;',
+        sourceMapConfig: this.sourcemaps,
+      });
+    });
+
+    return mergeTrees(vendorTrees, {
+      overwrite: true,
+      annotation: 'Packaged Vendor Javascript',
+    });
+  }
 };
diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js
index bd01b58c2..4577c9002 100644
--- a/lib/broccoli/ember-app.js
+++ b/lib/broccoli/ember-app.js
@@ -43,13 +43,8 @@ const lintAddonsByType = require('../utilities/lint-addons-by-type');
 const experiments = require('../experiments');
 const processModulesOnly = require('./babel-process-modules-only');
 const semver = require('semver');
-const Assembler = require('./assembler');
-const strategies = require('./strategies');
 const DefaultPackager = require('./default-packager');
 
-const createVendorJsStrategy = strategies.createVendorJsStrategy;
-const createApplicationJsStrategy = strategies.createApplicationJsStrategy;
-
 const normalizeUrl = emberAppUtils.normalizeUrl;
 const convertObjectToString = emberAppUtils.convertObjectToString;
 const contentFor = emberAppUtils.contentFor;
@@ -166,6 +161,12 @@ class EmberApp {
       name: this.name,
       project: this.project,
       registry: this.registry,
+      sourcemaps: this.options.sourcemaps,
+      scriptOutputFiles: this._scriptOutputFiles,
+      distPaths: {
+        appJsFile: this.options.outputPaths.app.js,
+        vendorJsFile: this.options.outputPaths.vendor.js,
+      },
     });
   }
 
@@ -1535,38 +1536,11 @@ class EmberApp {
   javascript() {
     let applicationJs = this.appAndDependencies();
 
-    let appFilePath = this.options.outputPaths.app.js;
     let vendorFilePath = this.options.outputPaths.vendor.js;
 
     this._scriptOutputFiles[vendorFilePath].unshift('vendor/ember-cli/vendor-prefix.js');
 
-    let strategies = [createApplicationJsStrategy({
-      name: this.name,
-      outputFile: appFilePath,
-      sourceMapConfig: this.options.sourcemaps,
-      annotation: 'Concat App',
-    })];
-    let importPaths = Object.keys(this._scriptOutputFiles);
-
-    // iterate over the keys and create N strategies
-    // to support scenarios like
-    // app.import('vendor/foobar.js', { outputFile: 'assets/baz.js' });
-    importPaths.forEach(importPath => {
-      strategies.push(createVendorJsStrategy({
-        files: this._scriptOutputFiles[importPath],
-        isMainVendorFile: importPath === vendorFilePath,
-        outputFile: importPath,
-        sourceMapConfig: this.options.sourcemaps,
-        annotation: 'Vendor JS',
-      }));
-    });
-
-    let assembler = new Assembler(applicationJs, {
-      annotation: 'Assembler (vendor & appJS)',
-      strategies,
-    });
-
-    return assembler.toTree();
+    return this._defaultPackager.packageJavascript(applicationJs);
   }
 
   /**
diff --git a/lib/broccoli/strategies.js b/lib/broccoli/strategies.js
index 5e9377ebe..9eb956c32 100644
--- a/lib/broccoli/strategies.js
+++ b/lib/broccoli/strategies.js
@@ -123,64 +123,4 @@ module.exports = {
       sourceMapConfig: options.sourceMapConfig,
     });
   },
-
-  /*
-    Concatenates all application's javascript Broccoli trees into one, as follows:
-
-    Given an input tree that looks like:
-    ```
-    addon-tree-output/
-      ember-ajax/
-      ember-data/
-      ember-engines/
-      ember-resolver/
-      ...
-    bower_components/
-      usertiming/
-      sinonjs/
-      ...
-    the-best-app-ever/
-      components/
-      config/
-      helpers/
-      routes/
-      ...
-    vendor/
-      ...
-      babel-core/
-      ...
-      broccoli-concat/
-      ...
-      ember-cli-template-lint/
-      ...
-    ```
-
-    Produces a tree that looks like:
-
-    ```
-    assets/
-      the-best-app-ever.js
-      the-best-app-ever.map (if sourcemaps are enabled)
-    ```
-
-    @method createApplicationJsStrategy
-    @param {Object} options
-    @return {Strategy} Concatenate Strategy (application and dependencies).
-   */
-  createApplicationJsStrategy(options) {
-    return new ConcatenationStrategy({
-      inputFiles: [`${options.name}/**/*.js`],
-      headerFiles: [
-        'vendor/ember-cli/app-prefix.js',
-      ],
-      footerFiles: [
-        'vendor/ember-cli/app-suffix.js',
-        'vendor/ember-cli/app-config.js',
-        'vendor/ember-cli/app-boot.js',
-      ],
-      outputFile: options.outputFile,
-      annotation: options.annotation,
-      sourceMapConfig: options.sourceMapConfig,
-    });
-  },
 };


Test patch:
diff --git a/tests/unit/broccoli/assembler-test.js b/tests/unit/broccoli/assembler-test.js
deleted file mode 100644
index 47cbfe853..000000000
--- a/tests/unit/broccoli/assembler-test.js
+++ /dev/null
@@ -1,177 +0,0 @@
-'use strict';
-
-const co = require('co');
-const Assembler = require('../../../lib/broccoli/assembler');
-const mergeTrees = require('broccoli-merge-trees');
-const broccoliTestHelper = require('broccoli-test-helper');
-const buildOutput = broccoliTestHelper.buildOutput;
-const createTempDir = broccoliTestHelper.createTempDir;
-
-const expect = require('chai').expect;
-
-describe('broccoli-assembler', function() {
-  let input;
-
-  beforeEach(co.wrap(function *() {
-    input = yield createTempDir();
-
-    input.write({
-      'addon-tree-output': {
-        'ember-ajax': {
-          'request.js': '',
-        },
-        'ember-cli-app-version': {
-          'initializer-factory.js': '',
-        },
-        'modules': {
-          'ember-data': {
-            'transform.js': '',
-            'store.js': '',
-          },
-        },
-      },
-      'the-best-app-ever': {
-        'router.js': 'router.js',
-        'app.js': 'app.js',
-        'components': {
-          'x-foo.js': 'x-foo.js',
-        },
-        'config': {
-          'environment.js': 'environment.js',
-        },
-      },
-      'vendor': {
-        'loader': {
-          'loader.js': '',
-        },
-        'ember': {
-          'jquery': {
-            'jquery.js': '',
-          },
-          'ember.debug.js': '',
-        },
-        'ember-cli': {
-          'app-boot.js': 'app-boot.js',
-          'app-config.js': 'app-config.js',
-          'app-prefix.js': 'app-prefix.js',
-          'app-suffix.js': 'app-suffix.js',
-          'test-support-prefix.js': 'test-support-prefix.js',
-          'test-support-suffix.js': 'test-support-suffix.js',
-          'tests-prefix.js': 'tests-prefix.js',
-          'tests-suffix.js': 'tests-suffix.js',
-          'vendor-prefix.js': 'vendor-prefix.js',
-          'vendor-suffix.js': 'vendor-suffix.js',
-        },
-        'ember-cli-shims': {
-          'app-shims.js': '',
-        },
-        'ember-resolver': {
-          'legacy-shims.js': '',
-        },
-      },
-    });
-  }));
-
-  afterEach(function() {
-    input.dispose();
-  });
-
-  describe('constructor', function() {
-    it('throws an exception if input tree is not passed in', function() {
-      expect(() => {
-        new Assembler();
-      }).to.throw(/You have to pass a broccoli tree in./);
-    });
-
-    it('sets `strategies` to an empty array if the property is undefined', function() {
-      let assembler = new Assembler(input.path());
-
-      expect(assembler.strategies).to.deep.equal([]);
-    });
-
-    it('sets `annotation` to an empty string if the property is undefined', function() {
-      let assembler = new Assembler(input.path());
-
-      expect(assembler.annotation).to.equal('');
-    });
-  });
-
-  it('returns a passed in tree if `strategies` are empty', function() {
-    let assembler = new Assembler(input.path());
-
-    expect(assembler.toTree()).to.deep.equal(input.path());
-  });
-
-  it('throws an exception if passed in strategy does not define `toTree` method', function() {
-    let assembler = new Assembler(input.path(), {
-      strategies: [{ }],
-    });
-
-    expect(() => {
-      expect(assembler.toTree()).to.deep.equal(input.path());
-    }).to.throw(/Strategy has to define `toTree` method./);
-  });
-
-  it('throws an exception if passed in strategy\'s `toTree` method is not a function', function() {
-    let assembler = new Assembler(input.path(), {
-      strategies: [{
-        toTree: {},
-      }],
-    });
-
-    expect(() => {
-      expect(assembler.toTree()).to.deep.equal(input.path());
-    }).to.throw(/`toTree` needs to be a function./);
-  });
-
-  it('throws an exception if passed in strategy `toTree` method does not return a tree', function() {
-    let assembler = new Assembler(input.path(), {
-      strategies: [{
-        toTree() {
-          return {};
-        },
-      }],
-    });
-
-    expect(() => {
-      expect(assembler.toTree()).to.deep.equal(input.path());
-    }).to.throw(/`toTree` has to return a broccoli tree./);
-  });
-
-  it('produces a correct tree given a custom strategy', co.wrap(function *() {
-    let strategyTree = yield createTempDir();
-    strategyTree.write({
-      'baz.js': 'function foobar() {}',
-    });
-    // this is a simple "merge" strategy
-    // it creates a simple test tree and merges it with the input
-    // tree and returns the result
-    const mergeTreeStrategy = {
-      toTree(assembler, inputTree) {
-        return mergeTrees([strategyTree.path(), inputTree], {
-          annotation: 'bar.js tree merger',
-        });
-      },
-    };
-
-    let assembler = new Assembler(input.path(), {
-      strategies: [mergeTreeStrategy],
-      annotation: 'fight fire with fire',
-    });
-
-    let finalTree = assembler.toTree();
-    let finalTreeOutput = yield buildOutput(finalTree);
-    let finalTreeOutputInfo = finalTreeOutput.read();
-
-    expect(finalTree._annotation).to.equal('fight fire with fire');
-    expect(finalTreeOutputInfo['baz.js']).to.equal('function foobar() {}');
-    expect(Object.keys(finalTreeOutputInfo)).to.deep.equal([
-      'addon-tree-output',
-      'baz.js',
-      'the-best-app-ever',
-      'vendor',
-    ]);
-
-    strategyTree.dispose();
-  }));
-});
diff --git a/tests/unit/broccoli/default-packager/javascript-test.js b/tests/unit/broccoli/default-packager/javascript-test.js
new file mode 100644
index 000000000..be2bf5f79
--- /dev/null
+++ b/tests/unit/broccoli/default-packager/javascript-test.js
@@ -0,0 +1,153 @@
+'use strict';
+
+const co = require('co');
+const expect = require('chai').expect;
+const DefaultPackager = require('../../../../lib/broccoli/default-packager');
+const broccoliTestHelper = require('broccoli-test-helper');
+
+const buildOutput = broccoliTestHelper.buildOutput;
+const createTempDir = broccoliTestHelper.createTempDir;
+
+describe('Default Packager: Javascript', function() {
+  let input, output;
+
+  let scriptOutputFiles = {
+    '/assets/vendor.js': [
+      'vendor/ember-cli/vendor-prefix.js',
+      'vendor/loader/loader.js',
+      'vendor/ember/jquery/jquery.js',
+      'vendor/ember-cli-shims/app-shims.js',
+      'vendor/ember-resolver/legacy-shims.js',
+      'vendor/ember/ember.debug.js',
+    ],
+  };
+  let MODULES = {
+    'addon-tree-output': {
+      'ember-ajax': {
+        'request.js': '',
+      },
+      'ember-cli-app-version': {
+        'initializer-factory.js': '',
+      },
+      'modules': {
+        'ember-data': {
+          'transform.js': '',
+          'store.js': '',
+        },
+      },
+    },
+    'the-best-app-ever': {
+      'router.js': 'router.js',
+      'app.js': 'app.js',
+      'components': {
+        'x-foo.js': 'x-foo.js',
+      },
+      'config': {
+        'environment.js': 'environment.js',
+      },
+    },
+    'vendor': {
+      'loader': {
+        'loader.js': '',
+      },
+      'ember': {
+        'jquery': {
+          'jquery.js': '',
+        },
+        'ember.debug.js': '',
+      },
+      'ember-cli': {
+        'app-boot.js': 'app-boot.js',
+        'app-config.js': 'app-config.js',
+        'app-prefix.js': 'app-prefix.js',
+        'app-suffix.js': 'app-suffix.js',
+        'test-support-prefix.js': 'test-support-prefix.js',
+        'test-support-suffix.js': 'test-support-suffix.js',
+        'tests-prefix.js': 'tests-prefix.js',
+        'tests-suffix.js': 'tests-suffix.js',
+        'vendor-prefix.js': 'vendor-prefix.js',
+        'vendor-suffix.js': 'vendor-suffix.js',
+      },
+      'ember-cli-shims': {
+        'app-shims.js': '',
+      },
+      'ember-resolver': {
+        'legacy-shims.js': '',
+      },
+    },
+  };
+
+  before(co.wrap(function *() {
+    input = yield createTempDir();
+
+    input.write(MODULES);
+  }));
+
+  after(co.wrap(function *() {
+    yield input.dispose();
+  }));
+
+  afterEach(co.wrap(function *() {
+    yield output.dispose();
+  }));
+
+  it('caches packaged javascript tree', co.wrap(function *() {
+    let defaultPackager = new DefaultPackager({
+      distPaths: {
+        appJsFile: '/assets/the-best-app-ever.js',
+        vendorJsFile: '/assets/vendor.js',
+      },
+      scriptOutputFiles,
+    });
+
+    expect(defaultPackager._cachedJavascript).to.equal(null);
+
+    output = yield buildOutput(defaultPackager.packageJavascript(input.path()));
+
+    expect(defaultPackager._cachedJavascript).to.not.equal(null);
+    expect(defaultPackager._cachedJavascript._annotation).to.equal('Packaged Javascript');
+  }));
+
+  it('packages javascript files with sourcemaps on', co.wrap(function *() {
+    let defaultPackager = new DefaultPackager({
+      distPaths: {
+        appJsFile: '/assets/the-best-app-ever.js',
+        vendorJsFile: '/assets/vendor.js',
+      },
+      scriptOutputFiles,
+    });
+
+    output = yield buildOutput(defaultPackager.packageJavascript(input.path()));
+
+    let outputFiles = output.read();
+
+    expect(Object.keys(outputFiles.assets)).to.deep.equal([
+      'the-best-app-ever.js',
+      'the-best-app-ever.map',
+      'vendor.js',
+      'vendor.map',
+    ]);
+  }));
+
+  it('packages javascript files with sourcemaps off', co.wrap(function *() {
+    let defaultPackager = new DefaultPackager({
+      distPaths: {
+        appJsFile: '/assets/the-best-app-ever.js',
+        vendorJsFile: '/assets/vendor.js',
+      },
+      scriptOutputFiles,
+      sourcemaps: {
+        enabled: false,
+      },
+    });
+
+    output = yield buildOutput(defaultPackager.packageJavascript(input.path()));
+
+    let outputFiles = output.read();
+
+    expect(Object.keys(outputFiles.assets)).to.deep.equal([
+      'the-best-app-ever.js',
+      'vendor.js',
+    ]);
+  }));
+});
diff --git a/tests/unit/broccoli/strategies-test.js b/tests/unit/broccoli/strategies-test.js
deleted file mode 100644
index 3776038a8..000000000
--- a/tests/unit/broccoli/strategies-test.js
+++ /dev/null
@@ -1,79 +0,0 @@
-'use strict';
-
-const expect = require('chai').expect;
-const strategies = require('../../../lib/broccoli/strategies');
-
-const createVendorJsStrategy = strategies.createVendorJsStrategy;
-const createApplicationJsStrategy = strategies.createApplicationJsStrategy;
-
-describe('assembler strategies', function() {
-  it('concatenate strategy for application\'s javascript is generated correctly', function() {
-    let strategy = createApplicationJsStrategy({
-      name: 'the-best-app-ever',
-      annotation: 'the-best-app-ever concat',
-      sourceMapConfig: { enabled: true },
-      outputFile: 'the-best-app-ever.js',
-    });
-
-    expect(strategy).to.deep.equal({
-      options: {
-        annotation: 'the-best-app-ever concat',
-        footerFiles: [
-          'vendor/ember-cli/app-suffix.js',
-          'vendor/ember-cli/app-config.js',
-          'vendor/ember-cli/app-boot.js',
-        ],
-        headerFiles: [
-          'vendor/ember-cli/app-prefix.js',
-        ],
-        inputFiles: [
-          'the-best-app-ever/**/*.js',
-        ],
-        outputFile: 'the-best-app-ever.js',
-        sourceMapConfig: {
-          'enabled': true,
-        },
-      },
-    });
-  });
-
-  it('concatenate strategy for application\'s vendor javascript is generated correctly', function() {
-    let scriptOutputFiles = {
-      '/assets/vendor.js': [
-        'vendor/ember-cli/vendor-prefix.js',
-        'vendor/loader/loader.js',
-        'vendor/ember/jquery/jquery.js',
-        'vendor/ember/ember.debug.js',
-        'vendor/ember-cli-shims/app-shims.js',
-        'vendor/ember-resolver/legacy-shims.js',
-      ],
-    };
-    let strategy = createVendorJsStrategy({
-      files: scriptOutputFiles['/assets/vendor.js'],
-      annotation: 'the-best-app-ever vendor concat',
-      sourceMapConfig: { enabled: true },
-      outputFile: '/assets/vendor.js',
-    });
-
-    expect(strategy).to.deep.equal({
-      options: {
-        annotation: 'the-best-app-ever vendor concat',
-        footerFiles: [],
-        headerFiles: [
-          'vendor/ember-cli/vendor-prefix.js',
-          'vendor/loader/loader.js',
-          'vendor/ember/jquery/jquery.js',
-          'vendor/ember/ember.debug.js',
-          'vendor/ember-cli-shims/app-shims.js',
-          'vendor/ember-resolver/legacy-shims.js',
-        ],
-        inputFiles: [],
-        outputFile: '/assets/vendor.js',
-        separator: '\n;',
-        sourceMapConfig: {
-          'enabled': true,
-        },
-      },
-    });
-  });
-});