Más contenido relacionado
Similar a testharness.js の基礎 (20)
Más de ourmaninjapan (20)
testharness.js の基礎
- 9. 良い良い WebWeb テストの必須項目テストの必須項目
•
WebWeb プラットフォームのテストスイートプラットフォームのテストスイート
•
testharness.jstestharness.js 等等
•
対象メソッド、要素、属性等 対象メソッド、要素、属性等
•
テストコード自体 テストコード自体
- 13. サンプルサンプル
<div<div id="id="loglog""></div>></div>
<div<div id="id="testEltestEl" class="" class="BobBob""></div>></div>
<script><script>
var testEl = document.getElementById('var testEl = document.getElementById('testEltestEl');');
test(function() {test(function() {
assert_equals(testEl.getAttribute('assert_equals(testEl.getAttribute('classclass'), ''), 'BobBob');');
}, '}, 'Can get class attribute with getAttribute()Can get class attribute with getAttribute()');');
</script></script>