diff --git a/tests/jsunit/blockly_test.js b/tests/jsunit/blockly_test.js
index b0162ed5b..36cac235d 100644
--- a/tests/jsunit/blockly_test.js
+++ b/tests/jsunit/blockly_test.js
@@ -124,6 +124,16 @@ function test_removeClass() {
assertEquals('Removing "zero"', '', p.className);
}
+function test_hasClass() {
+ var p = document.createElement('p');
+ p.className = ' one three two three ';
+ assertTrue('Has "one"', Blockly.hasClass_(p, 'one'));
+ assertTrue('Has "two"', Blockly.hasClass_(p, 'two'));
+ assertTrue('Has "three"', Blockly.hasClass_(p, 'three'));
+ assertFalse('Has no "four"', Blockly.hasClass_(p, 'four'));
+ assertFalse('Has no "t"', Blockly.hasClass_(p, 't'));
+}
+
function test_shortestStringLength() {
var len = Blockly.shortestStringLength('one,two,three,four,five'.split(','));
assertEquals('Length of "one"', 3, len);
diff --git a/tests/jsunit/index.html b/tests/jsunit/index.html
index 4c445b930..09cd4ffb3 100644
--- a/tests/jsunit/index.html
+++ b/tests/jsunit/index.html
@@ -10,6 +10,7 @@
+