Ben Drucker
e3f715f71b
Clean up all DOM nodes when tests end
...
As the test suite grows it's bad for debugging to leak tons of elements
onto document.body. In order to concisely append/remove on the tests'
"end" event, we need to make sure the root tagName doesn't change. If it
does, the `tree` returned from `app.start` will no longer be the root
node and the removal fn will throw.
2016-07-04 16:19:17 -07:00
Ben Drucker
1e006f3716
Enable xvfb on travis to run electron
2016-07-04 16:19:17 -07:00
Ben Drucker
6d0070e62f
Update npm test command to use electron
2016-07-04 16:19:17 -07:00
Ben Drucker
57ec042e1a
Add test nesting using sheet router (cov 100!)
2016-07-04 16:19:17 -07:00
Ben Drucker
04b9e0efd2
Add test coverage for disabling sheet-router history/href listeners
2016-07-04 16:19:17 -07:00
Ben Drucker
e6a2a8c01d
Add test for hash based routing
2016-07-04 16:19:17 -07:00
Ben Drucker
37976c86f5
Add a routing test using proxyquire to short-circuit history handlers
...
* proxyquire (pq) replaces choo's sheet-router/history with a mock
* pq-universal replaces pq w/ pqify in the browser
* magic!
2016-07-04 16:19:17 -07:00
Ben Drucker
fb38d151c6
Add test for default freezing + noFreeze option
2016-07-04 16:19:17 -07:00
Ben Drucker
c3293b5953
Remove dead check for strict prev/current state equality
...
* Barracks will always return a new object
https://github.com/yoshuawuyts/barracks/blob/11d3c6d1822beadce0251279f9bc8370c569ea5e/index.js#L144
2016-07-04 16:19:17 -07:00
Ben Drucker
30a228b3e0
Update onError hook test to only expect err argument
2016-07-04 16:19:17 -07:00
Ben Drucker
e0783320f7
Add tests and fixes for rehydration
...
* Barracks must get an initial state or state.location is undefined
* Replaces document.addEventListener w/ pkg handling existing ready doc
2016-07-04 16:19:12 -07:00
Ben Drucker
e2f0c5429c
Add tests for onError, onAction, and onState hooks from barracks
2016-07-04 08:07:54 -07:00
Ben Drucker
180ea8ae10
Remove all the "should" grammar from tests
2016-07-04 08:07:54 -07:00
Ben Drucker
57030b4e0e
Update browser tests for new router fn arguments
...
See 6407188ee9
2016-07-04 08:07:54 -07:00
Ben Drucker
3fc66acdc3
Add test confirming toString() works with min-document elements
2016-07-04 08:07:54 -07:00
Ben Drucker
5f4fda6646
Generate test coverage via electron with tape-istanbul
2016-07-04 08:07:54 -07:00
Ben Drucker
6f97b1c468
Add test:electron script for all tests
2016-07-04 08:07:54 -07:00
Ben Drucker
0a191566d6
Fix effect test: barracks requires a callback
2016-07-04 08:07:54 -07:00
Ben Drucker
cdabc4d85f
Return outerHTML from toString if available, fall back to toString()
2016-07-04 08:07:54 -07:00