DISQUS

Mat Schaffer: Harsh opinions on JavaScript testing

  • TTop · 4 months ago
    I've used YUI Test a bit, seems decent: http://developer.yahoo.com/yui/yuitest, but I haven't worked with any of these others, so I can't compare.
  • Mat Schaffer · 3 months ago
    Right on. Thanks for the check. I too often forget to revisit the YUI suite since I initially used it in 2005 when it only had a small handful of tools. Maybe I'll do another post with that and a deeper dive into JSpec.
  • TJ Holowaychuk · 3 months ago
    JSpec can be used without the grammar. The syntax is very similar to Screw.Unit, however JSpec has far more features, and is actively developed / tested by the community.
  • Mat Schaffer · 3 months ago
    Thanks for chiming in TJ! I think JSpec will be the next tool I look at for testing. The features definitely look good, I just worry that a number of your opinions won't mesh with the projects I need to test. We'll see how flexible it is once I start digging in.
  • TJ Holowaychuk · 3 months ago
    Sounds good! not much is forced upon the user though. Check out the readme / site or drop by the #jspec IRC channel if you need any help. People seem to jump to conclusions about how things have to be done with JSpec, which are never true, its very extensible / customizable.

    The project templates for example are simply a starting point, the structure does not have to be that way at all. 3.x is going to ship with a bunch of new features, hopefully timed together with my Ruby TestSwarm implementation.

    Besides if you find there is something missing, or blocking your way drop an issue on Github and I will check it out :)
  • TJ Holowaychuk · 3 months ago
    hell even if you do not like snake-case 2.x partially implements interchangeable DSLs (3.x will top this off) so you can have camel-case galore. The grammar can be summed up really quickly, this slideshow might be worth checking out, speeds up testing once you get the hang of it :) http://slidechop.com/presentations/68/slides
  • Mat Schaffer · 3 months ago
    Thanks for the support! I see the cool factor but "getting the hang of it" would become a speed-bump when trying to introduce the tool to the rest of my team (~40 devs total). And the specs won't be worth much if I'm the only one using them. I'll hit you up in IRC once I get started for sure.
  • TJ Holowaychuk · 3 months ago
    For sure man, I see the value in that, it is a perfectly valid argument. Which is why I support literal JS specs as well (you can even use a combination of each if you want), but yeah a bigger team would not benefit much from the grammar. I work solo so thats where my rage with JS literals got me started with the grammar lol