aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/debug_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/debug_test.js')
-rw-r--r--js/debug_test.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/debug_test.js b/js/debug_test.js
index 702cc76e..d0d646a5 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 || typeof Uint8Array == 'undefined') {
+ 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) {