diff options
Diffstat (limited to 'tests/defs.js')
-rw-r--r-- | tests/defs.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/defs.js b/tests/defs.js index 07e863b..b00fda0 100644 --- a/tests/defs.js +++ b/tests/defs.js @@ -56,3 +56,11 @@ test('to_jsstring', function (t) { t.deepEqual(defs.to_jsstring(v.byte_array), v.literal, v.description); }); }); + +test('to_jsstring fails on invalid unicode', function (t) { + t.plan(1); + + t.throws(function() { + defs.to_jsstring([165]); + }, "non-utf8 char"); +}); |