文件名称:test-driven-development
文件大小:3KB
文件格式:ZIP
更新时间:2024-04-21 18:15:38
JavaScript
描述:wordCounter() 测试:“如果段落只有一个单词,则应该返回1。代码:const text =“ Hello”; wordCounter(text);预期输出:1 测试:“如果段落中有两个单词,则应该返回2。” 代码:const text =“ hello there”; wordCounter(text); 预期产量:2 测试:“对于空字符串,它应该返回0。” 代码:wordCounter(“”); 预期输出:0 测试:“对于只有空格的字符串,它应该返回0。” 代码:wordCounter(“”); 预期输出:0 测试:“它不应将数字视为单词。” 代码:wordCounter(“ hi there 77 19”); 预期产量:2 描述:numberOfOccurencesInText()测试:“对于空字符串,它应该返回0次出现一个单词。” 代码:const te
【文件预览】:
test-driven-development-main
----index.html(1KB)
----js()
--------scripts.js(2KB)
----README.md(2KB)
----css()
--------styles.css(0B)