josephg / josephg/ShareJS

Better client testing

Open
#55 1 comment 0 reactions 0 assignees View on GitHub
implement me
Dominant language
JavaScript
Stars
5k
Forks
454
PR merge metrics
No merged PRs in 30d

Description

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

I bet at least one of these things doesn't currently work correctly.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.