SDK Requirements: exports the receivers
Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
parent
ef6db28464
commit
b53d660402
|
@ -8,19 +8,27 @@ describe("The SDK Requirements", () => {
|
|||
expect(v02.event().spec.payload.specversion).to.equal("0.2");
|
||||
});
|
||||
|
||||
it("should have 'Spec' export", () => {
|
||||
it("should exports 'Spec'", () => {
|
||||
expect(v02).to.have.property("Spec");
|
||||
});
|
||||
|
||||
it("should have 'StructuredHTTPEmitter' export", () => {
|
||||
it("should exports 'StructuredHTTPEmitter'", () => {
|
||||
expect(v02).to.have.property("StructuredHTTPEmitter");
|
||||
});
|
||||
|
||||
it("should have 'BinaryHTTPEmitter' export", () => {
|
||||
it("should exports 'StructuredHTTPReceiver'", () => {
|
||||
expect(v02).to.have.property("StructuredHTTPReceiver");
|
||||
});
|
||||
|
||||
it("should exports 'BinaryHTTPEmitter'", () => {
|
||||
expect(v02).to.have.property("BinaryHTTPEmitter");
|
||||
});
|
||||
|
||||
it("should have 'event' export", () => {
|
||||
it("should exports 'BinaryHTTPReceiver'", () => {
|
||||
expect(v02).to.have.property("BinaryHTTPReceiver");
|
||||
});
|
||||
|
||||
it("should exports 'event'", () => {
|
||||
expect(v02).to.have.property("event");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,10 @@ const Spec = require("../lib/specs/spec_0_2.js");
|
|||
const StructuredHTTPEmitter =
|
||||
require("../lib/bindings/http/emitter_structured_0_2.js");
|
||||
const {HTTPBinary02} = require("../lib/bindings/http/emitter_binary_0_2.js");
|
||||
const StructuredHTTPReceiver =
|
||||
require("../lib/bindings/http/receiver_structured_0_2.js");
|
||||
const BinaryHTTPReceiver =
|
||||
require("../lib/bindings/http/receiver_binary_0_2.js");
|
||||
|
||||
function event() {
|
||||
return new Cloudevent(Spec);
|
||||
|
@ -11,6 +15,8 @@ function event() {
|
|||
module.exports = {
|
||||
Spec,
|
||||
StructuredHTTPEmitter,
|
||||
StructuredHTTPReceiver,
|
||||
BinaryHTTPEmitter : HTTPBinary02,
|
||||
BinaryHTTPReceiver,
|
||||
event
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue