<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
  <title>UIZE Unit Tests | JavaScript Examples | UIZE JavaScript Framework</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="keywords" content="Uize.Test Uize.Widgets.Log.Widget UizeSite.Widgets.UnitTests.Widget"/>
  <meta name="description" content="See how to run the various unit tests of the UIZE JavaScript Framework. Run a unit test and watch as the test runner chunks through its tests."/>
  <link rel="alternate" type="application/rss+xml" title="UIZE JavaScript Framework - Latest News" href=""/>
  <link rel="stylesheet" href="../css/page.css"/>
  <link rel="stylesheet" href="../css/page.example.css"/>


<script type="text/javascript" src="../js/Uize.js"></script>

<h1 class="header">
  <a id="page-homeLink" href="../index.html" title="UIZE JavaScript Framework home"></a>
  <a href="../index.html" class="homeLinkText" title="UIZE JavaScript Framework home">UIZE JavaScript Framework</a>

<div class="main">
  <h1 class="document-title">
    <a href="../javascript-examples.html" class="breadcrumb breadcrumbWithArrow">JAVASCRIPT EXAMPLES</a>
    UIZE Unit Tests
    <div class="pageActionsShell">
      <div id="page-actions" class="pageActions"><a href="source-code/uize-unit-tests.html" class="buttonLink">SOURCE</a></div>

  <!-- explanation copy -->

  <div class="explanation">
    <p>This example lets you select and run any of the tests of the UIZE JavaScript Framework. Use the test selector to choose your test (an asterisk indicates a minimal load-module-and-build-it test that has been dynamically created because no dedicated test exists for a module). On selecting a test, the test will be loaded dynamically, during which time the <b>"START"</b> and <b>"STOP"</b> buttons will be disabled. After it has loaded, the buttons will be enabled again. Use the <b>"START"</b> button to start running the selected test. While the test is being performed, the progress bar will be updated to show how far you are through the test. Also, the log will be written to with details of the test's progress. You can stop the test at any time using the <b>"STOP"</b> button. If the test fails, test execution will be aborted and a synopsis of the failure will be displayed in a dialog. To run the entire test suite for the UIZE JavaScript Framework, select the <b>"RUN ALL MODULE TESTS"</b> option.</p>

  <!-- unit tests UI -->

  <div id="page-unitTests"></div>

<!-- JavaScript code to make the HTML "come alive" -->

<script type="text/javascript">

Uize.require (
  function () {
    'use strict';

    /*** create the example page widget ***/
      var _page = = UizeSite.Page.Example ();

    /*** add the log widget ***/
      _page.addChild (
          test:Uize.Url.fromParams (location.href).runtest

    /*** wire up the page widget ***/
      _page.wireUi ();