tests:
- text: <code>body</code>应该有一个<code>h1</code>元素。
testString: 'assert($("body").children("h1").length == 1, "The <code>body</code> should have one <code>h1</code> element.");'
- text: <code>h1</code>元素应该包含文本“Learning D3”。
testString: 'assert($("h1").text() == "Learning D3", "The <code>h1</code> element should have the text "Learning D3" in it.");'
- text: 您的代码应该访问<code>d3</code>对象。
testString: 'assert(code.match(/d3/g), "Your code should access the <code>d3</code> object.");'
- text: 您的代码应该使用<code>select</code>方法。
testString: 'assert(code.match(/\.select/g), "Your code should use the <code>select</code> method.");'
- text: 您的代码应该使用<code>append</code>方法。
testString: 'assert(code.match(/\.append/g), "Your code should use the <code>append</code> method.");'
- text: 您的代码应该使用<code>text</code>方法。
testString: 'assert(code.match(/\.text/g), "Your code should use the <code>text</code> method.");'
<body>
<script>
// Add your code below this line
// Add your code above this line
</script>
</body>