Commits

Stephen McKamey committed 2aa75b9

adding unit tests for js/no-js

Comments (0)

Files changed (2)

test/parseTests.js

 	http://www.zytrax.com/tech/web/mobile_ids.html
 */
 
+module("cssua js/no-js");
+
+test("<html> 'no-js' class missing", function() {
+
+	var input = document.documentElement.className || "";
+
+	var expected = "missing";
+
+	var actual = input.indexOf("no-js") < 0 ? "missing" : "present";
+
+	same(actual, expected, "");
+});
+
+test("&lt;html&gt; 'js' class present", function() {
+
+	var input = document.documentElement.className || "";
+
+	var expected = "present";
+
+	var actual = input.indexOf("js") < 0 ? "missing" : "present";
+
+	same(actual, expected, "");
+});
+
 module("cssua.parse()");
 
 test("IE 5.0, Windows", function() {
 <!DOCTYPE html>
-<html>
+<html class="no-js">
 <head>
 	<meta charset="UTF-8">
 	<title>CssUserAgent (cssua.js) Unit Tests</title>