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

Closed

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

Activity

  1. changed the title [-]Write tests for the defined API[/-] [+]Create a batch of tests fot Connection spec compliance[/+] on Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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