From Noisebridge
< JavaScript
Revision as of 10:20, 9 March 2014 by Garrett (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

[edit] First, Download YUI

[edit] YUI Usage Overview

Copy 'n' paste the following test shell into a file and save it:

<html lang="en">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<link rel="Index" href="../">
<title>testing yuitest</title>
<script src=""></script>
"use strict";
YUI().use('test', 'test-console', function(Y) {
    new Y.Test.Console().render();
    var Assert = Y.Assert,
        ArrayAssert = Y.ArrayAssert,
        suite = new Y.Test.Suite("Dom");
    var blah;
    suite.add(new Y.Test.Case({
        name: 'DOM',
        "test blah": function() {
            Assert.areSame("blah", blah, "blah was not 'blah'");
Personal tools