tests:
- text: 页面上应该有3个<code>li</code>元素,每个元素中的文本应该是“list item”。大写和间距应完全匹配。
testString: 'assert($("li").text().match(/list item/g).length == 3, "There should be 3 <code>li</code> elements on the page, and the text in each one should say "list item". Capitalization and spacing should match exactly.");'
- text: 您的代码应该访问<code>d3</code>对象。
testString: 'assert(code.match(/d3/g), "Your code should access the <code>d3</code> object.");'
- text: 您的代码应该使用<code>selectAll</code>方法。
testString: 'assert(code.match(/\.selectAll/g), "Your code should use the <code>selectAll</code> method.");'
<body>
<ul>
<li>Example</li>
<li>Example</li>
<li>Example</li>
</ul>
<script>
// Add your code below this line
// Add your code above this line
</script>
</body>