cozy / cozy-emails

Email Client for Cozy
GNU Affero General Public License v3.0
66 stars 41 forks source link

Client test stack #798

Closed m4dz closed 8 years ago

m4dz commented 8 years ago

This PR is an experiment at this time. Do not merge before we take some decisions about its concerns and behaviors.

The PR tends to prove that client non-view components like Stores and Flux patterns can be unit-tested headlessly to ensure the application fondation is stable enough.

nono commented 8 years ago

@m4dz why did you choose to try tape?

frankrousseau commented 8 years ago

Please don't include Casper.

frankrousseau commented 8 years ago

And same as @nono please don't change mocha.

m4dz commented 8 years ago

Tape seems to be more and more pushed to the front by the comunity, and it have several advantages:

But it's just a test for the moment, I don't want to change some habits before we discuss together about the need / want to change the runner.

frankrousseau commented 8 years ago

Casper was already present, sorry. Can you remove it?

frankrousseau commented 8 years ago

Please, we already have numerous technologies. We are satisfied with Mocha. It's not the time to add another technology to our stack.

m4dz commented 8 years ago

@frankrousseau Yep, I'll remove Casper to let only unit-tests at this time. We probably want to make some functional tests to validate scenarios later, and then check to reintroduce it, but it's a subject for another PR, later (mean: after refctor :wink:)

About the choice of the runner, I'm totally open. This one is just a test, we can switch back to mocha if we still find it more efficient.

nono commented 8 years ago

@m4dz If you want to test runners, I think painless has some interesting features. But I agree with Frank, mocha works pretty well and I don't see a good reason to change for the moment.

frankrousseau commented 8 years ago

@m4dz Could you fix @aenario remarks?

m4dz commented 8 years ago

This one touch to the Dispatcher, and we (probably) won't keep it as it after the refactor. I made it for demo purposes first, so 2 solutions for me:

  1. we fix @aenario remarks but certainly trash them later
  2. we merge it in this state and evolves it after the refactor

@aenario, @frankrousseau any prefs?

frankrousseau commented 8 years ago

I prefer we merge it. Putting tests in this app is important.

m4dz commented 8 years ago

I prefer we merge it. Putting tests in this app is important.

I agree: in this state, app is ready to run tests, we just need to write them :smile:. @aenario, good for you?