Comment by nullserver
5 years 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.
Ha, 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.
That just seems pointless
> Soon noticed that chuck Norris was in our compiled JavaScript
Is that a library? Or the string "Chuck Norris"?
String. Used as factory test for populating objects in tests.
It certainly caught my attention.
I was assuming that someone used the string as a name in the test?
Yes 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.
2 replies →
Or the actor/martial artist?
bravo! i'll take the downvotes that this content-free comment will garner, but you just made my morning.
related: Guy Fieri in node https://nodesource.com/blog/is-guy-fieri-in-your-node-js-pac...