I think that we should push for Tests in all implementations.
However a question arises, how and what do we exactly test?
I don't know if there are tools for writing framework/language agnostic tests but something like:
assert.equal(ProfileName, 'Alon Bukai', 'Author name is correct');
This is a great idea! Frankly, I'm wondering why we didn't do this sooner. Haha
The only concern is that we have to go back and add tests for the existing implementations after we come up with a spec.
@brwr I already explained why we didn't initially cover this in the spec
Couple things:
1) I think tests should be yes or no. We should make sure all codebases implement the same spec and that includes testing. Having some implementations with tests and some without will cause more problems than it's worth.
2) There is a difference between TDD and writing tests. TDD means writing tests before code. Whether the author does TDD is less important than writing tests.
Also, because of https://github.com/gothinkster/realworld/issues/65 + this issue + other similar requests, I'm writing up a philosophy document that I'm shooting to have done by EOD that should also help shed light on this.
I don't think forcing TDD is necessary.
It is possible to have this spec be "extra credit" as you put it. But still have a spec which makes it easier to write tests. The hard part for me is really knowing how to test.
Ember does a lot of work for us by building test skeletons for us but what's inside? Not so sure.
@EricSimons TDD is test driven development.
Writing tests before writing any other code and then iterating towards passing tests.
Yeah, @anishkny's idea of having "extra credit" specs seems to be maturing like a fine wine as we hit more & more cases like this :) I'm going to noodle on how we could do this.
Re: TDD — is the way it's used in the spec right now makes sense, no?
Edit: yup, I needed to change some verbage in the spec :)
Just my 2 cents but I think the way it's worded here is perfect for realworld (other than using the term TDD when it's probably just referring to testing like mentioned above). If every repo sort of serves as a representative of that community I think that most people will be implementing some unit testing and if it's not there initially it would be a great contribution opportunity for the next developer. I don't think it needs to be required though.
FYI I just removed the improper TDD mentions in the spec 👍 Thanks for pointing that out folks!
We've agreed on a minimum testing spec with issue #90 so we can close this issue.