Skip to content

Commit 131fec3

Browse files
committedJul 24, 2014
Port duplicationTest.html to QUnit
1 parent 188b702 commit 131fec3

File tree

3 files changed

+11
-30
lines changed

3 files changed

+11
-30
lines changed
 

‎tests/duplicationTest.html

-30
This file was deleted.

‎tests/qunit.html

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
1212
<script src="../classList.js"></script>
1313
<script src="tests.js"></script>
14+
<script src="remove.js"></script>
1415
</body>
1516
</html>

‎tests/remove.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
QUnit.module("classList.remove");
2+
3+
QUnit.test("Removes duplicated instances of class", function(assert) {
4+
var el = document.createElement("p"), cList = el.classList;
5+
el.className = "ho ho ho"
6+
7+
cList.remove("ho");
8+
assert.ok(!cList.contains("ho"), "Should remove all instances of 'ho'");
9+
assert.strictEqual(el.className, "")
10+
});

0 commit comments

Comments
 (0)