diff options
Diffstat (limited to 'js/debug_test.js')
-rw-r--r-- | js/debug_test.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/debug_test.js b/js/debug_test.js index 702cc76e..73810871 100644 --- a/js/debug_test.js +++ b/js/debug_test.js @@ -41,6 +41,8 @@ goog.require('proto.jspb.test.IsExtension'); goog.require('proto.jspb.test.Simple1'); +// CommonJS-LoadFromFile: testbinary_pb +goog.require('proto.jspb.test.TestAllTypes'); describe('debugTest', function() { it('testSimple1', function() { @@ -74,6 +76,15 @@ describe('debugTest', function() { }, jspb.debug.dump(message)); }); + it('testBytes', function() { + if (COMPILED || !window['Uint8Array']) { + return; + } + var message = new proto.jspb.test.TestAllTypes(); + var bytes = new Uint8Array(4); + message.setOptionalBytes(bytes); + assertEquals(jspb.debug.dump(message)['optionalBytes'], bytes); + }); it('testExtensions', function() { if (COMPILED) { |