We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 188b702 commit 131fec3Copy full SHA for 131fec3
tests/duplicationTest.html
tests/qunit.html
@@ -11,5 +11,6 @@
11
<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
12
<script src="../classList.js"></script>
13
<script src="tests.js"></script>
14
+<script src="remove.js"></script>
15
</body>
16
</html>
tests/remove.js
@@ -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