UNPKG

siesta-lite

Version:

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

69 lines (53 loc) 2.31 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 */ Ext.define(&#39;Siesta.Project.Browser.UI.CanFillAssertionsStore&#39;, { processNewResult : function (assertionStore, test, result, parentResult) { var data = { id : result.id, result : result, loaded : true, leaf : !(result instanceof Siesta.Result.SubTest), expanded : (result instanceof Siesta.Result.SubTest) &amp;&amp; result.test.specType != &#39;it&#39; }; var alreadyInTheStore = assertionStore.getNodeById(result.id) if (alreadyInTheStore) { alreadyInTheStore.triggerUIUpdate() } else { Ext.suspendLayouts() alreadyInTheStore = (assertionStore.getNodeById(parentResult.id) || assertionStore.getRootNode()).appendChild(data); Ext.resumeLayouts() } if (result.isPassed &amp;&amp; !result.isPassed() || result.isWarning) alreadyInTheStore.ensureVisible() alreadyInTheStore.updateFolderStatus() }, // is bubbling and thus triggered for all tests (including sub-tests) processEveryTestEnd : function (assertionStore, test) { var testResultNode = assertionStore.getNodeById(test.getResults().id) // can be missing for &quot;root&quot; tests testResultNode &amp;&amp; testResultNode.updateFolderStatus() } }) </pre> </body> </html>