Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Create a batch of tests fot Connection spec compliance #2

@daviddias

Description

@daviddias

Once https://github.com/diasdavid/abstract-transport/issues/1 is done

Similar to what we do in other interface- modules, let's have a batch of tests for this.

The best way is to have a setup method that once called, returns a connection pair that is linked, on top of the transport, so:

var common = {
  setup: function (t, cb) {
    // create two sockets that are linked of X transport
    cb(null, socketsPair)
  },
  teardown: function (t, cb) {
    // destroy both sockets
    cb()
  }
}

tests(tape, common)

This way we can test any transport. We can repurpose a lot of the tests that exist in libp2p-tcp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions