【发布时间】:2012-03-03 14:31:43
【问题描述】:
在听了 JavaScript Weekly 播客之后,我听说了 jQueryLocalStorageTexteareas 插件,我决定自己尝试实现它。
如果浏览器支持,它的基本作用是将文本区域的内容保存到浏览器的本地存储中。
我的问题是,我将如何以 TDD 风格编写这个?最高级别的测试实现会是什么样子?应该是这样的
when I type foo in a text area
and I close the page
and I open it again
then the text area should contain foo
是否值得使用 Selenium 之类的东西来实现这些测试?还是有更好的方法?
【问题讨论】:
标签: javascript testing tdd integration-testing bdd