rmurphey / js-assessment

A test-driven approach to assessing JS skills
5.15k stars 2.05k forks source link

Code branching test is too trivial? #8

Closed gigafied closed 12 years ago

gigafied commented 12 years ago

I know the tests in flowControl.js are not turned on, so I dont know if they are complete yet, but the code branching test seems too simple to really serve its purpose.

I.e. it is easily solved in 3 lines of code.

https://github.com/gigafied/js-assessment/blob/answers/tests/app/flowControl.js#L11

rmurphey commented 12 years ago

It is definitely trivial, and yet there are reportedly a lot of people who can't solve it :) But, yeah, I haven't added these tests because I feel like this set needs more meat before it's worth including.

gigafied commented 12 years ago

You have a good point actually, thinking back on some "developers" I have met, I can definitely see some people not being able to solve this (or writing 20 lines of code to solve it in some weird way).

I guess when I read "you should be able to branch your code", I was thinking more along the lines of making efficient use of if/else.

rmurphey commented 12 years ago

I'd love to see more tests related to branching, and maybe fizzbuzz isn't a good fit in that set of tests. Open to suggestions & contributions!

rmurphey commented 12 years ago

I'm going to close this issue, but would definitely welcome tests that are more advanced.