3 ms·
Was new guy at a startup. Soon noticed that chuck Norris was in our compiled JavaScript. Turned out Someone had included the entire test suite in production de
by nullserver 6y ago
Was new guy at a startup.
Soon noticed that chuck Norris was in our compiled JavaScript.
Turned out Someone had included the entire test suite in production deploy.
Had been like that for nearly a year.
A few minutes of work brought out client js file from 12MB to less then 1mb.
- jogjayr 6y ago> Soon noticed that chuck Norris was in our compiled JavaScript Is that a library? Or the string "Chuck Norris"?
- jeffgreco 6y agoOr the actor/martial artist?
- finnh 6y agobravo! i'll take the downvotes that this content-free comment will garner, but you just made my morning.
- kevincox 6y agoI was assuming that someone used the string as a name in the test?
- hnick 6y agoYes I think they meant they saw a weird name that stood out (I've seen Donald Duck at work) and they investigated more, finding it was test data.
- wiz21c 6y agoI've seen "Carmen Electra" myself :-) And other funny (more gross) names in the dark corners of huge databases... I also had a customer discover a playboy center page at the end of a test we sent to them. One of the dev thought it'd be a nice reward. Things went very bad from him right after the phone call...
- nullserver 6y agoAlways assume others have the sense of humor of a 99 year old stick of tnt. Had someone at work mention they needed to drop off a dog at grooming on the way to pick up Chinese. I had to walk away for a bit, as I couldn’t hold it in, but didn’t know if that sort of humor would fly with that crowd.
- nullserver 6y agoString. Used as factory test for populating objects in tests. It certainly caught my attention.
- deleted 6y ago[deleted]
- rsj_hn 6y agorelated: Guy Fieri in node https://nodesource.com/blog/is-guy-fieri-in-your-node-js-packages/ https://nodesource.com/blog/is-guy-fieri-in-your-node-js-pac...
- gordaco 6y agoHa, this is one of the reasons why I also include outlandish and wrong-looking stuff in unit tests. If we see where it doesn't belong, then we know for sure that we are doing something wrong. Most often I use unicode strings in unexpected alphabets (i.e. from languages that are not supported by our application and that are not used by the mother tongue of any developer from our team). This includes Chinese, Malayalam, Arabic and a few more. There was a time when I wanted to test the "wrong data" cases for some deserialising function, and I was part annoyed and part amusingly surprised to discover that doing Integer.parseInt("٤٣٠٤٦٧٢١") in Java does parse the arabic digits correctly even without specifying any locale.
- notretarded 6y agoThat just seems pointless