1.3.20 • Published 9 years ago

iopa-test v1.3.20

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
9 years ago

IOPA iopa-test

Build Status IOPA limerun

NPM

About

iopa-test is a collection of test harnesses for testing IOPA middleware

Status

Working release

Includes:

Stub Server (transport server)

  • Creates and receives dummy IOPA Messages per standard IOPA server spec
  • Not for production use, only for testing other modules

Installation

npm install iopa-test --save-dev

Usage

const stubServer = require('iopa-test').stubServer,
 iopa = require('iopa');

var app = new iopa.App();

app.use(function (context, next) {
      context.response["server.RawStream"].end("HELLO WORLD ");
      return next();
  });

var server = stubServer.createServer(app.build())

// SIMULATE INBOUND REQUEST 
server.receive("TEST");

// SIMULATE OUTBOUND REQUEST with MIRRORED RESPONSE 

server.connect("urn://localhost").then(function (client) {
      return client[SERVER.Fetch]("/topic", "GET", function (context) {
          context["server.RawStream"].end("HELLO WORLD ");
      });
  });
 

See iopa-logger for a reference implementation of this repository

1.3.20

9 years ago

1.3.19

9 years ago

1.3.18

9 years ago

1.3.17

9 years ago

1.3.16

10 years ago

1.3.15

10 years ago

1.3.14

10 years ago

1.3.13

10 years ago

1.3.12

10 years ago

1.3.11

10 years ago

1.3.10

10 years ago

1.3.9

10 years ago

1.3.8

10 years ago

1.3.7

10 years ago

1.3.6

10 years ago

1.3.5

10 years ago

1.3.4

10 years ago

1.3.3

10 years ago

1.3.2

10 years ago

1.3.1

10 years ago

1.2.6

10 years ago

1.2.5

10 years ago

1.2.4

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago