What I show you is like.

 
Harbach: So if i declare my vars BEFORE do***ent.readyfucntion{. it should work?

Rouillard: When you use yourvar = 1;

Midyett: But do this only for debug

Pierzchala: I think this will work

Graces: Thanks cannap i understand everything now

Faas: Http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html

Glaeser: Hello, I do an ajax jsonp call like this: var self = this; self.roles = ko.observableArray; . $.ajax{ . success: functiondata { var musers = $.mapdata, functionitem, tuid { return new Usertuid, item, self.roles }; }}; self.roles or this.roles is not an array but some kind of an object, why is that?

Bruna: I dont know anything about anything compengi. but if the object only contains an array, maybe: object.toArray could solve it? i’m sure there’s some sort of: toarray function

Kenndy: Folks, I start my development process from acceptance tests, which basically is an end2end test. Question here, should I mock out implementions details and test only abstraction? In example if I have some database integration, mock adapter to database and decouple it from any concrete db, or leave it as it is and test with real db?

Kenndy: Problem with latter is that if I change db later then my test will fail which is bad.

Kenndy: Or rather not fail, but raise compilation error

Riska: Kenndy: end to end tests usually don’t use mocks

Riska: Kenndy: ideally end to end tests should just cover “broad strokes”, ie. general use cases. You want to use unit level tests for more specific things

Riska: E2e tests are complex, easy to break and slow, which makes them unsuitable for more specific tests

Riska: Then all of them broke

Riska: And they were too much of a pain to maintain

Riska: And then they were no more

Kenndy: Zomg: I use e2e tests in TDD process to make sure what unit tests I need

Menaker: Screenshots are a good compromise, imo

Riska: Kenndy: interesting, in what way do you do that?

Riska: I just use unit tests for tdd :

Kenndy: It’s well described in Software development guided by tests

Kenndy: If you start with unit tests you don’t really know if what you test will be needed

Kenndy: It’slike starting development from middle of app

Riska: I’ve not had that problem, perhaps it depends on the style of unit tests used. I follow a more BDD style

Kenndy: Http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627

Riska: But I think that books is on my amazon list :

Kenndy: I just don’t know what to mock and what not

Kenndy: For sure I ahve to mock external services

Riska: I think anything that isn’t working currently

Kenndy: I think I won’t mock database

Zike: Kenndy, most apis provide a test version

Kenndy: Schaetzle: yes, but not all, AdCash doesn’t 😛

Kenndy: This my e2e test http://pastebin.com/RLRruKJp

Kenndy: But it doesn’t matter :

Kenndy: I preffer to keep verbose tests that are decoupled from implementation details

Riska: Kenndy: interesting, is this some cu***ber type testing thing for python?

Kenndy: Zomg: no, given, when, then are not doing anything

Kenndy: It’s done on unittest library from stdlib

Riska: Why not use Cu***ber?

Kenndy: We did, but it just increases accidental complexity

Riska: Well, I guess its usefulness depends on what exactly you’re doing, but at least I found with Selenium it does somewhat improve the reusability of the test code so it’s a bit easier to maintain

Kenndy: Hmm, there is one additional layer to translate business-langauge to code

Kenndy: But business is not looking at this tests

Kenndy: What I show you is like cu***ber but without business-readable domain-specific language