TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What if cucumber and jQuery had a baby?

52 点作者 tswicegood将近 14 年前

10 条评论

3am将近 14 年前
I'm in QA - what niche does this fill for you?<p>The reason that I ask is that usually DSLs and other user acceptance tools exist to allow non-programmers to design tests. That is why cucumber's Gherkin is not in a Ruby syntax, and why robot and FitNesse use html tables. And further, they generally operate at an integration level, which is why the have hooks in for like Selenium frequently.<p>I think the project is cool, but I do wonder where you see it fitting in. A way to make jsunit tests more readable and cleaner?<p>EDIT: Let me add that I love it whenever QA topics make it to HN. I know QA is usually a post-seed funding activity, and that's a shame (in my biased opinion).
评论 #2666649 未加载
评论 #2666631 未加载
paulca将近 14 年前
For the record: this was a thought experiment that I made on the plane home from TXJS last week and was just something I wondered if I could do.<p>The reference to cucumber is really only a nod to inspiration for the given / when / then syntax, and the emphasis of speccing behavior in plane English.<p>I've also been fascinated by the idea of writing executable English as implementation logic, and since JS allows object labels to be strings, why not make full descriptive sentences.<p>I haven't used this for anything useful or practical (it's days old) ... but I'm hoping it will be a neat way to spec and as someone mentioned document the behaviour of my app and to try and try to separate the intent of what I'm writing from the implementation.
seliopou将近 14 年前
Nice idea, but what does this actually do for you? If you translate the first example to straight jQuery, it's shorter, and you don't need to know about 'whenever' to figure out what's going on. And even if you were familiar with 'whenever', you'd have to look at three different places to understand what the code is _actually_ doing.<p>What's cool, I think, is the chaining of predicates. That's useful in general, and should be a totally different library.
评论 #2667334 未加载
评论 #2667148 未加载
评论 #2667155 未加载
blhack将近 14 年前
If you're as confused as I am, "cucumber", in this case, is referring to a testing framework for ruby, not a vegetable.<p><a href="https://github.com/cucumber/cucumber/wiki/" rel="nofollow">https://github.com/cucumber/cucumber/wiki/</a><p>a side note: am I just totally out of touch with things? "Fructose", "Cucumber", "Coffeescript", "V8"?
评论 #2668148 未加载
asnyder将近 14 年前
Reminds me of Hypertalk and Metatalk. I personally don't like such verbose syntax, but many do. It's usually used in marketing languages to non-developer professionals, however, in the end, I feel it becomes way more verbose and complicated than if you used the conventional concise approach.<p>I used to joke that when using one of these scripting languages you would have to start your statements with "please" and end with "thank you".
评论 #2667679 未加载
评论 #2667681 未加载
anodari将近 14 年前
Someone knows if there is a relationship between this or BDD and a rule engine used by expert systems?
hitonagashi将近 14 年前
:(.<p>Using Whenever and Whenever (ruby cron gem) together will make my head pop.
rsanheim将近 14 年前
If it's a painful as cucumber, I would stay far away.
MostAwesomeDude将近 14 年前
This burns my eyes almost as badly as Fructose. Fructose, if you're not aware of it, is a C# application that translates Ruby to PHP. (<a href="http://www.fructoselang.org/" rel="nofollow">http://www.fructoselang.org/</a>)
jsavimbi将近 14 年前
There's a political complaint about the lack of semi colons in the script and its subsequent breakage in minification. Otherwise, I like it.<p>From a QA perspective, it's been my experience that no matter how much you simplify the DSL for the business user, it's always a pain to get them up and running and if you have a TDD point of view, you'll be much more successful, especially when engaging in a project that is very DOM-manipulation heavy.
评论 #2666934 未加载
评论 #2667350 未加载