{"version":3,"sources":["lib/test/littleJasmineBoot.ts"],"names":[],"mappings":"AAmCA,OAAO,CAAC,IAAI,cAAc,EAAE,GAAG,CAAC;AAEhC;;GAEG;AACH,OAAO,WAAW,OAAO,CAAC;IACxB,MAAM,KAAK;;KAAmB;IAE9B,MAAM,WAAW;oBACH,IAAI,EAAE,GAAG;QACd,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;QAC1B,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,GAAG,GAAG;QAChD,sBAAsB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;KAC5D;CAEF;AAED;;;;;;GAMG;AACH,kBAAU,UAAU,CAAC;IACnB,UAAiB,IAAI,CAAC;QAqHpB,SAAgB,YAAY,SAG3B;KAEF;CACF","file":"../../../lib/test/littleJasmineBoot.d.ts","sourcesContent":["/* eslint-disable */\n/*\nMost of this code is just a copy of\n    node_modules/jasmine-core/lib/jasmine-core/boot.js\nwith this copyright:\n\nCopyright (c) 2008-2019 Pivotal Labs\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n/*\n Starting with version 2.0, this file \"boots\" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js` and `jasmine_html.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.\n If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.\n The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.\n\n [jasmine-gem]: http://github.com/pivotal/jasmine-gem\n */\n\ndeclare let jasmineRequire: any;\n\n/**\n * Add missing types - TODO: fix @type/jasmine\n */\ndeclare namespace jasmine {\n  class Timer { constructor(); }\n\n  class QueryString {\n    constructor(opts: any);\n    public getParam(key: string): any;\n    public navigateWithNewParam(a: string, b: boolean): any;\n    public fullStringWithNewParam(k: string, v: string): string;\n  }\n\n}\n\n/**\n * This customization of the default jasmin boot.js exposes an 'startJasmine' function\n * by which the 'main' es2015 test module can begin execution of the suite\n * of tests that have asynchronously loaded onto the page.\n * The default 'boot' expects that every test spec has loaded synchronously\n * before it executes.\n */\nnamespace littleware {\n  export namespace test {\n    const win = window as any;\n    /**\n   * ## Require &amp; Instantiate\n   *\n   * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.\n   */\n    window.jasmine = jasmineRequire.core(jasmineRequire);\n\n    /**\n   * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.\n   */\n    jasmineRequire.html(jasmine);\n\n    /**\n   * Create the Jasmine environment. This is used to run all specs in a project.\n   */\n    const env = jasmine.getEnv();\n\n    /**\n   * ## The Global Interface\n   *\n   * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.\n   */\n    const jasmineInterface = jasmineRequire.interface(jasmine, env);\n\n    /**\n   * Helper function for readability above.\n   */\n    function extend(destination, source) {\n      for (const property in source) { destination[property] = source[property]; }\n      return destination;\n    }\n\n    /**\n   * Add all of the Jasmine global/public interface to the global scope, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.\n   */\n    extend(window, jasmineInterface);\n\n    /**\n   * ## Runner Parameters\n   *\n   * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.\n   */\n\n    const queryString = new jasmine.QueryString({\n      getWindowLocation() { return window.location; },\n    });\n\n    const filterSpecs = !!queryString.getParam('spec');\n\n    const config = {\n      failFast: queryString.getParam('failFast'),\n      oneFailurePerSpec: queryString.getParam('oneFailurePerSpec'),\n      hideDisabled: queryString.getParam('hideDisabled'),\n      random: null,\n      seed: null,\n      specFilter: null,\n    };\n\n    const random = queryString.getParam('random');\n\n    if (random !== undefined && random !== '') {\n      config.random = random;\n    }\n\n    const seed = queryString.getParam('seed');\n    if (seed) {\n      config.seed = seed;\n    }\n\n    /**\n   * ## Reporters\n   * The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).\n   */\n    const htmlReporter = new (jasmine.HtmlReporter as any)({\n      env,\n      navigateWithNewParam(key, value) { return queryString.navigateWithNewParam(key, value); },\n      addToExistingQueryString(key, value) { return queryString.fullStringWithNewParam(key, value); },\n      getContainer() { return document.body; },\n      createElement() { return document.createElement.apply(document, arguments); },\n      createTextNode() { return document.createTextNode.apply(document, arguments); },\n      timer: new jasmine.Timer(),\n      filterSpecs,\n    });\n\n    /**\n   * The `jsApiReporter` also receives spec results,\n   * and is used by any environment that needs to\n   * extract the resultsfrom JavaScript.\n   */\n    env.addReporter(jasmineInterface.jsApiReporter);\n    env.addReporter(htmlReporter as jasmine.CustomReporter);\n\n    /**\n   * Filter which specs will be run by matching the start\n   * of the full name against the `spec` query param.\n   */\n    const specFilter = new (jasmine.HtmlSpecFilter as any)({\n      filterString() { return queryString.getParam('spec'); },\n    });\n\n    config.specFilter = function (spec) {\n      return specFilter.matches(spec.getFullName());\n    };\n\n    (env as any).configure(config);\n\n    /**\n   * Setting up timing functions to be able to be overridden.\n   * Certain browsers (Safari, IE 8, phantomjs) require this hack.\n   */\n    window.setTimeout = window.setTimeout;\n    window.setInterval = window.setInterval;\n    window.clearTimeout = window.clearTimeout;\n    window.clearInterval = window.clearInterval;\n\n    export function startJasmine() {\n      htmlReporter.initialize();\n      env.execute();\n    }\n\n  }\n}\n"]}