Starting a major refactor of the client code. #184

merged 7 commits into from Apr 12, 2012

3 participants

nrn commented Apr 8, 2012

This is the start of modularizing the client code, and adding unit tests. We are using a node based build process, using browserify, and adding tests with mocha. is getting split into files in lib, and files with the same name in test are being used to unit test them.

The commands to work with this are currently in

Thanks to @WardCunningham for pairing on this.


I'm continuing to work on this branch, slowly moving parts out of legacy and adding some tests. The test setup we have seems to be working very well, using Mocha to run the tests, Expect to assert things, and I just added Sinon for spys, stubs, and mochs.


I've untwisted much of the client code (now in and fixed a few bugs too.

made refresh small enough to understand
pass item forward to buildPage through the dom
collected like methods together, improving comments
fixed bug that led to out of order fetch resolution


I've moved the code to a branch named modules. I've messed up my models branch and can't push it.


Doh. I'm off to jury duty today :/ But if there is anything I can do to help tomorrow or thursday let me know.


Too bad they hold you in-communicado when in the courthouse. Can you use a portable computer? I think Ethan is coding today while traveling to Portland. Git works great disconnected :)


I actually could have, I didn't know ahead of time, but they had wifi, tables, and power. I took the time to catch up on some reading though.

Ward, do you want me to take a stab at merging models and modules, or wait till we have a moment to work together on this?


No worries Ward, this reorganization stuff does not play well with git.

I'm having problems figuring out how to test some stuff (like the history/location code), but most things I feel like I'm getting meaningful tests in on. Getting jQuery on the test page how we really want it is part of what we are wedged up on :)

Very nice!

@nrn nrn Merge remote-tracking branch 'wc/modules' into models

Big merge resolved! Everything is looking good so far, but this needs some shaking out for sure. One test fails because we haven't gotten the main wiki api free yet, and I figured it was better to leave it broken instead of faking it.

nrn added some commits Apr 12, 2012
@nrn nrn Merge pull request #1 from WardCunningham/4a6e239fcf5a900fe8a9f1d4163…

improve reporting of recent changes
@nrn nrn Merge pull request #2 from WardCunningham/modules
speeding up the talking builder
@WardCunningham WardCunningham merged commit 9ff202b into WardCunningham:master Apr 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment