Hacker News new | ask | show | jobs
by warpspin 140 days ago
> This assumes the code you wrote is already correct and giving the correct answer, so why bother writing tests?

It catches regressions. Which is the one thing where such semi-automated testing is most useful in my eyes.

No clue though why they gave it that weird "expect" name. Basically, it's semi-automated regression testing.

1 comments

Expect is a classic Unix testing utility. So naming it expect gives it a connection to that heritage.

https://en.wikipedia.org/wiki/Expect

Hmm, yes, I know that one and one of the reasons why I considered the naming weird. Original Tcl expect is rather automation than testing in the slot in my mind it occupies, even if it maybe could be (badly) used as a testing tool.