JavaScript/Notes/Testing: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
=== First, Download YUI=== | |||
https://github.com/yui/yui3/releases | |||
=== YUI Usage Overview=== | |||
http://yuilibrary.com/yui/quick-start/ | |||
Copy 'n' paste the following test shell into a file and save it: | Copy 'n' paste the following test shell into a file and save it: | ||
<source lang="html5"> | <source lang="html5"> |
Latest revision as of 10:20, 9 March 2014
First, Download YUI[edit]
https://github.com/yui/yui3/releases
YUI Usage Overview[edit]
http://yuilibrary.com/yui/quick-start/
Copy 'n' paste the following test shell into a file and save it:
<source lang="html5"> <!DOCTYPE HTML>
<html lang="en"> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <link rel="Index" href="../"> <title>testing yuitest</title> <script src="http://yui.yahooapis.com/3.15.0/build/yui/yui-min.js"></script> </head> <body> <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'"); }
}));
Y.Test.Runner.add(suite);
Y.Test.Runner.run();
}); </script> </body> </html> </source>