From 15f89e5e971f09fc399cf61578d8630635c8380d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Sun, 9 Jun 2019 20:56:05 -0300 Subject: [PATCH] Folder for bindings test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- test/bindings/http/unmarshaller_0_2_tests.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/bindings/http/unmarshaller_0_2_tests.js diff --git a/test/bindings/http/unmarshaller_0_2_tests.js b/test/bindings/http/unmarshaller_0_2_tests.js new file mode 100644 index 0000000..5dca1cf --- /dev/null +++ b/test/bindings/http/unmarshaller_0_2_tests.js @@ -0,0 +1,15 @@ +var expect = require("chai").expect; +var Unmarshaller = require("../../../lib/bindings/http/unmarshaller_0_2.js"); + +describe("HTTP Unmarshaller - Version 0.2", () => { + + it("Throw error when payload is not string or object", () => { + // setup + var payload = 83; + var unmarshaller = new Unmarshaller(); + + // act and assert + expect(unmarshaller.unmarshall.bind(payload)) + .to.throw("Invalid payload type, allowed are: string or object"); + }); +});