From e7b5c833c6a79c12f262ba24df4648f006e5df1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Thu, 1 Aug 2019 17:43:48 -0300 Subject: [PATCH] Exporting the v0.3 stuff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- test/sdk_test.js | 18 ++++++++++++++++++ v03/index.js | 2 ++ 2 files changed, 20 insertions(+) diff --git a/test/sdk_test.js b/test/sdk_test.js index b85125f..7d54a5d 100644 --- a/test/sdk_test.js +++ b/test/sdk_test.js @@ -37,5 +37,23 @@ describe("The SDK Requirements", () => { it("should create an event using the right spec version", () => { expect(v03.event().spec.payload.specversion).to.equal("0.3"); }); + + it("should exports 'Spec'", () => { + expect(v03).to.have.property("Spec"); + }); + + // StructuredHTTPEmitter + + // StructuredHTTPReceiver + + it("should exports 'BinaryHTTPEmitter'", () => { + expect(v03).to.have.property("BinaryHTTPEmitter"); + }); + + // BinaryHTTPReceiver + + it("should exports 'event'", () => { + expect(v03).to.have.property("event"); + }); }); }); diff --git a/v03/index.js b/v03/index.js index 89a3e99..ab341ee 100644 --- a/v03/index.js +++ b/v03/index.js @@ -1,5 +1,6 @@ const Cloudevent = require("../lib/cloudevent.js"); const Spec = require("../lib/specs/spec_0_3.js"); +const BinaryHTTPEmitter = require("../lib/bindings/http/emitter_binary_0_3.js"); function event() { return new Cloudevent(Spec); @@ -7,5 +8,6 @@ function event() { module.exports = { Spec, + BinaryHTTPEmitter, event };