Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1887783.6V6b7vWGym@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 14 Oct 2012 00:11:37 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <1935017.YUQ9Xjkia0@PointedEars.de> <5c5bef27-f0c9-4379-9c52-43ee4002e534@n16g2000yqi.googlegroups.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 45 NNTP-Posting-Date: 14 Oct 2012 00:11:37 CEST NNTP-Posting-Host: 1043d79c.newsspool4.arcor-online.net X-Trace: DXC=Dm:PA2bYmIHj7E:bke<5HF4IUKK@MlUDQE;hSbD Thomas 'PointedEars' Lahn wrote: >> Patricia Shanahan wrote: >>> Does the group have a recommendation for a unit test framework for >>> JavaScript? [ ... ] >> [ ... ] >> I have found jasmine too intuitive > > That's a very unusual aspersion to cast. Your internal error-correction is borken; it should have prefixed "un" to the adjective automatically. >> (very un-JUnit-like, which its >> creators >> present as a virtue; but I had come to appreciate the clear structure of >> JUnit tests as well, whereas Jasmine appears to me as sort of a childish, >> jQuery-like way of writing unit test by comparison). > > I'm not entirely sold on Behavior-Driven Development, but that's the > style of BDD, and not something specific to Jasmine. […] > > describe("The 'wordTester' functor', function() { > var fooTest = wordTester("foo"); > > it("matches whole words", function() { > expect(fooTest("contains foo and bar")).toBe(true) > }); > it("doesn't match nested words", function() { > expect(fooTest("foolish tomfoolery seafood")).not.toBe(true) > }); > }); If BDD (whoever coined that term again?) means that code is written like the above, so that it can be read from left to right like natural language, while completely ignoring sound and proven concepts of (object-oriented) programming (such as that namespaces should be used, method identifiers should be verbs and _not_ nouns, data properties should be nouns or adjectives, aso.), then I skip on learning (more about) BDD. PointedEars -- When all you know is jQuery, every problem looks $(olvable).