josephg/ShareJS — Issue #55: Better client testing
Author: josephg
Created: 2012-01-25 02:09:06+00:00
State: open

The client's test coverage is unusually low. It should have tests as thorough as the model tests.

These tests are conspicuously missing:

- Disconnect then reconnect works
- Documents are reopened when sharejs reconnects
- A closed document is not automatically reopened when sharejs reconnects
- A closed document can be reopened
- When a document is reopened, it specifies the type, the version, and doesn't request a new snapshot.
- open() still (eventually) works when the connection is closed but reconnecting
- Ops applied while a document is closed get sent to the server when it reconnects
- Remote ops applied while a document is closed get (correctly) applied locally
- Disconnect while an op is in-flight. The op should be resent when reconnection happens, with `dupIfSource:` set correctly
- `connecting`, `connected`, `handshake`, `ok` events are all fired from the connection
- Connection status events are fired from the document
- Bare `sharejs.open` returns the connection object
- The bare `sharejs.open` connection is closed when all documents have been manually closed