hoodiehq / ember-hoodie

Build awesome offline-first Ember apps with Hoodie!
MIT License
17 stars 6 forks source link

Add tests #5

Open courajs opened 8 years ago

courajs commented 8 years ago

Let's add some acceptance tests to make sure bindings update automatically

gr2m commented 8 years ago

I’ll try to create a dummy app and acceptance tests

courajs commented 8 years ago

A few issues have popped up while trying to add tests, mostly around persistent state. For example, testing user sign up can only run once right now, breaking ember test --server. We can add a teardown to destroy the account. Or check during setup for existence of the account and destroy it there. It's also sometimes the case that localStorage contains an invalid auth token from a previous run, and that needs to be cleared. It feels like we need some sort of "wipe hoodie" action we could do before each test.

gr2m commented 8 years ago

It feels like we need some sort of "wipe hoodie" action we could do before each test.

I’ll look into it! For the time being, localStorage.clear() and page reload should do the trick, can you give it a try? I’m traveling right now, but will be back to work Monday afternoon