Skip to content

Commit

Permalink
restore 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Mock committed Mar 10, 2018
1 parent f7cf9cf commit 3679ac4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/core/bitSeqObj.test.js
Expand Up @@ -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([[]]);
Expand Down

0 comments on commit 3679ac4

Please sign in to comment.