From 3679ac47ad8c7b5d0afd75e98aecdef49012b722 Mon Sep 17 00:00:00 2001 From: Brian Mock Date: Sat, 10 Mar 2018 14:31:50 -0800 Subject: [PATCH] restore 100% coverage --- test/core/bitSeqObj.test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/core/bitSeqObj.test.js b/test/core/bitSeqObj.test.js index b532e2e..0d152fa 100644 --- a/test/core/bitSeqObj.test.js +++ b/test/core/bitSeqObj.test.js @@ -27,6 +27,15 @@ describe("bitSeqObj", function() { }, /expects at least one/i); }); + it("throws when there are duplicate keys", function() { + assert.throws(function() { + Parsimmon.Binary.bitSeqObj([["a", 1], ["a", 7]]); + }, /duplicate/i); + assert.throws(function() { + Parsimmon.Binary.bitSeqObj([["a", 1], ["b", 2], ["a", 5]]); + }, /duplicate/i); + }); + it("throws you pass the wrong type of argument", function() { assert.throws(function() { Parsimmon.Binary.bitSeqObj([[]]);