From 8487b1c76cdaccda1f8ec69174aa03e1a7c23eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Sat, 2 Nov 2019 07:05:20 -0300 Subject: [PATCH] Sdk tests for spec 1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- test/sdk_test.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/test/sdk_test.js b/test/sdk_test.js index 0ee3c0e..b61f7fd 100644 --- a/test/sdk_test.js +++ b/test/sdk_test.js @@ -1,6 +1,7 @@ const expect = require("chai").expect; const v02 = require("../v02/index.js"); const v03 = require("../v03/index.js"); +const v1 = require("../v1/index.js"); describe("The SDK Requirements", () => { describe("v0.2", () => { @@ -70,4 +71,38 @@ describe("The SDK Requirements", () => { expect(v03).to.have.property("event"); }); }); + + describe("v1.0", () => { + it("should create an event using the right spec version", () => { + expect(v1.event().spec.payload.specversion).to.equal("1.0"); + }); + + it("should exports 'Spec'", () => { + expect(v1).to.have.property("Spec"); + }); + + it("should exports 'StructuredHTTPEmitter'", () => { + expect(v1).to.have.property("StructuredHTTPEmitter"); + }); + + it("should exports 'StructuredHTTPReceiver'", () => { + expect(v1).to.have.property("StructuredHTTPReceiver"); + }); + + it("should exports 'BinaryHTTPEmitter'", () => { + expect(v1).to.have.property("BinaryHTTPEmitter"); + }); + + it("should exports 'BinaryHTTPReceiver'", () => { + expect(v1).to.have.property("BinaryHTTPReceiver"); + }); + + it("should exports 'HTTPUnmarshaller'", () => { + expect(v1).to.have.property("HTTPUnmarshaller"); + }); + + it("should exports 'event'", () => { + expect(v1).to.have.property("event"); + }); + }); });