4 ms·
Re: Tests for Design Feedback. I used to follow that approach, but I found that it locks you into the implementation and adds unnecessary drag when refactoring.
by briantakita 13y ago
Re: Tests for Design Feedback. I used to follow that approach, but I found that it locks you into the implementation and adds unnecessary drag when refactoring.
Now I like to think of tests as black box and white box. I prefer black box tests because it tells me if the system works from the api or interface, while giving me the freedom to refactor and reimplement without unnecessary drag.
Now for my Shameless plug. If your test suite has lots of edge cases, the test suite takes a long time to run because the same setup logic is being run many times.
I created jasmine-flow to reduce the number of times the setup logic is run by reorganizing the tests into linear flows. https://github.com/btakita/jasmine-flow https://github.com/btakita/jasmine-flow
I sped up my test suite about 10x (~400 seconds to ~40 seconds) doing this.
I know, it's not 1 second, but since these are black box tests, I know if things work in reality. What is really important for development flow is running individual tests quickly (< 1 second).