Node Version: Queries the node with action: version and compares against latest version of the Nano Node.
Block Counts: Queries the node with action: block_count and checks for uncomfirmed blocks. If there are a lot of unconfirmed blocks (see node_tests.js for specifics) the test fails. If there are only a few unconfirmed, the test is a partial success.
API Supports "process": Queries the node with action: process and checks that the node returns an error message indicating it attempted to process the block. I am not attempting to broadcast legitimate blocks for these tests.
API Supports "work_generate": Queries the node with action: work_generate and checks for a returned work value. Many public nodes won't support this action because of the processing power costs. Some that allow limit requests via tokens/time will charge more than for a work_generate call than any other.
Token Limited: Queries the node with an arbitrary action and looks to see if a known token system is in use. Some public nodes use tokens (likely those that have implemented the NanoRPCProxy to prevent abuse of their free-to-use public node. In this test I check for the response data to include a value for requestsLimit.
WebSocket Setup: Attempts to connect to the WebSocket provided.
WebSocket Ping: Messages the WebSocket with a ping message as defined in the Nano docs. Watches for pong message back with corresponding id.
WebSocket Subscribe All: Messages the WebSocket with a a request to subscribe to confirmations (confirmation_type=active) without specifying any particular addresses, as shown in in the Nano docs. Watches for "ack" message back with corresponding id.
WebSocket Subscribe Addresses: Messages the WebSocket with a subscribe to confirmations (confirmation_type=active) for one specific address, as shown in in the Nano docs. Watches for "ack" message back with corresponding id.
Please note all tests error out after 10 seconds of no response.