Evgenus / spa

Single Page Applications builder
Other
7 stars 2 forks source link

Add more test for error handling in loading of various AMD modules #74

Open Evgenus opened 9 years ago

Evgenus commented 9 years ago

Need test for all EvaluationErrors

Evgenus commented 9 years ago

LOADER:tl: EvaluationError [object Object] ChangesInWindowError: During `dist_lodash` loading window object was polluted with: _
   "LOADER:tl:"
   "EvaluationError"
   {
      [functions]: ,
      __proto__: { },
      amdtype: null,
      deps: { },
      hash: "06d28202bf48e22a9d90673c8498c0d5",
      id: "dist_lodash",
      size: 229855,
      source: "/**
 * @license
 * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
 * Build: `lodash modern -o ./dist/lodash.js`
 * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
 * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
 * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 * Available under MIT license <http://lodash.com/license>
 */
;(function() {

  /** Used as a safe reference for `undefined` in pre ES5 environments */
  var undefined;

  /** Used to pool arrays and objects used internally */
  var arrayPool = [],
      objectPool = [];

  /** Used to generate unique IDs */
  var idCounter = 0;

  /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */
  var keyPrefix = +new Date + '';

  /** Used as the size when optimizations are enabled for large arrays */
  var largeArraySize = 75;

  /** Used as the max size of the `arrayPool` and `objectPool` */
  var maxPoolSize = 40;

  /** Used to detec",
      type: "amd",
      url: "node_modules/Multivalue/node_modules/lodash/dist/lodash.js"
   }
   {
      [functions]: ,
      __proto__: { },
      message: "During `dist_lodash` loading window object was polluted with: _",
      name: "ChangesInWindowError",
      props: [ ],
      self_name: "dist_lodash",
      stack: "ChangesInWindowError: During `dist_lodash` loading window object was polluted with: _
   at BasicEvaluator.prototype._check_window (http://localhost:8010/build/:372:7)
   at AMDEvaluator.prototype._check (http://localhost:8010/build/:453:5)
   at DepsAMDEvaluator.prototype._check (http://localhost:8010/build/:591:5)
   at BasicEvaluator.prototype.run (http://localhost:8010/build/:275:5)
   at Anonymous function (http://localhost:8010/build/:1031:11)
   at k (http://localhost:8010/build/:57:2837)
   at m (http://localhost:8010/build/:57:3109)
   at r (http://localhost:8010/build/:57:3641)
   at e (http://localhost:8010/build/:57:1326)"
   }
Evgenus commented 9 years ago
LOADER:tl: EvaluationError [object Object] ThisPollutionError: Code of `core` trying to modify host object.
   "LOADER:tl:"
   "EvaluationError"
   {
      [functions]: ,
      __proto__: { },
      amdtype: "deps",
      deps: { },
      hash: "59d251aa42e765276bac4ba4b7fa5d24",
      id: "core",
      size: 22288,
      source: ";(function (root, factory) {
    if (typeof exports === "object") {
        // CommonJS
        module.exports = exports = factory();
    }
    else if (typeof define === "function" && define.amd) {
        // AMD
        define([], factory);
    }
    else {
        // Global (browser)
        root.CryptoJS = factory();
    }
}(this, function () {

    /**
     * CryptoJS core components.
     */
    var CryptoJS = CryptoJS || (function (Math, undefined) {
        /**
         * CryptoJS namespace.
         */
        var C = {};

        /**
         * Library namespace.
         */
        var C_lib = C.lib = {};

        /**
         * Base object for prototypal inheritance.
         */
        var Base = C_lib.Base = (function () {
            function F() {}

            return {
                /**
                 * Creates a new object that inherits from this object.
                 *
                 * @param {Object} overrides Properties to copy into the new object.
                 *
                 * @return {Object} The new object.
                 *
                 * @static
                 *
                 * @example
        ",
      type: "amd",
      url: "node_modules/Multivalue/node_modules/crypto-js/core.js"
   }
   {
      [functions]: ,
      __proto__: { },
      message: "Code of `core` trying to modify host object.",
      name: "ThisPollutionError",
      props: [
         0: "CryptoJS",
         length: 1
      ],
      self_name: "core",
      stack: "ThisPollutionError: Code of `core` trying to modify host object.
   at AMDEvaluator.prototype._check (http://localhost:8010/build/:459:7)
   at DepsAMDEvaluator.prototype._check (http://localhost:8010/build/:591:5)
   at BasicEvaluator.prototype.run (http://localhost:8010/build/:275:5)
   at Anonymous function (http://localhost:8010/build/:1031:11)
   at k (http://localhost:8010/build/:57:2837)
   at m (http://localhost:8010/build/:57:3109)
   at r (http://localhost:8010/build/:57:3641)
   at e (http://localhost:8010/build/:57:1326)"
   }
wizzard0 commented 9 years ago

add define.amd?