UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

97 lines (82 loc) 3 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>The source code</title> <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../resources/prettify/prettify.js"></script> <style type="text/css"> .highlight { display: block; background-color: #ddd; } </style> <script type="text/javascript"> function highlight() { document.getElementById(location.hash.replace(/#/, "")).className = "highlight"; } </script> </head> <body onload="prettyPrint(); highlight();"> <pre class="prettyprint lang-js">/* Siesta 5.6.1 Copyright(c) 2009-2022 Bryntum AB https://bryntum.com/contact https://bryntum.com/products/siesta/license */ Class(&#39;Siesta&#39;, { /*PKGVERSION*/VERSION : &#39;5.6.1&#39;, // &quot;my&quot; should been named &quot;static&quot; my : { has : { config : null, activeHarness : null, license : &#39;%LICENSE%&#39; }, methods : { getConfigForTestScript : function (text) { try { eval(text) return this.config } catch (e) { return null } }, StartTest : function (arg1, arg2) { if (typeof arg1 == &#39;object&#39;) this.config = arg1 else if (typeof arg2 == &#39;object&#39;) this.config = arg2 else this.config = null } } } }) // fake StartTest function to extract test configs if (typeof StartTest == &#39;undefined&#39;) StartTest = Siesta.StartTest if (typeof startTest == &#39;undefined&#39;) startTest = Siesta.StartTest if (typeof describe == &#39;undefined&#39;) describe = Siesta.StartTest // from MDN // this polyfill is required by Ext, since Ext adds it to own context and after that assumes every function // used as a callback has &quot;bind&quot; method if (!Function.prototype.bind) { Function.prototype.bind = function(oThis) { if (typeof this !== &#39;function&#39;) { // closest thing possible to the ECMAScript 5 // internal IsCallable function throw new TypeError(&#39;Function.prototype.bind - what is trying to be bound is not callable&#39;); } var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () {}, fBound = function () { return fToBind.apply( this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)) ); }; fNOP.prototype = this.prototype; fBound.prototype = new fNOP(); return fBound; }; }</pre> </body> </html>