Permalink
Browse files

Fixed failing JS tests

  • Loading branch information...
acozzette committed Dec 4, 2017
1 parent 7bb8584 commit e372df5c975dc9720c9252e9b0b25c03e7c4b713
Showing with 3 additions and 11 deletions.
  1. +1 −0 js/commonjs/export_testdeps.js
  2. +1 −1 js/debug.js
  3. +1 −1 js/debug_test.js
  4. +0 −9 js/message_test.js
@@ -12,6 +12,7 @@
goog.provide('jspb.ExportTestDeps');
goog.require('goog.crypt.base64');
goog.require('goog.testing.PropertyReplacer');
goog.require('jspb.arith.Int64');
goog.require('jspb.arith.UInt64');
goog.require('jspb.BinaryEncoder');
View
@@ -79,7 +79,7 @@ jspb.debug.dump_ = function(thing) {
type == 'null' || type == 'undefined') {
return thing;
}
if (window.Uint8Array) {
if (typeof Uint8Array !== 'undefined') {
// Will fail on IE9, where Uint8Array doesn't exist.
if (message instanceof Uint8Array) {
return thing;
View
@@ -77,7 +77,7 @@ describe('debugTest', function() {
});
it('testBytes', function() {
if (COMPILED || !window['Uint8Array']) {
if (COMPILED || typeof Uint8Array == 'undefined') {
return;
}
var message = new proto.jspb.test.TestAllTypes();
View
@@ -1052,13 +1052,4 @@ describe('Message test suite', function() {
assertNan(message.getDefaultDoubleField());
});
it('testSerializePreservesEmptyNestedField', function() {
var message = new proto.jspb.test.OptionalFields();
message.setANestedMessage(new proto.jspb.test.OptionalFields.Nested());
message.addARepeatedMessage(new proto.jspb.test.OptionalFields.Nested());
message = proto.jspb.test.OptionalFields.deserialize(message.serialize());
assertNotNullNorUndefined(message.getANestedMessage());
assertEquals(1, message.getARepeatedMessageList().length);
});
});

0 comments on commit e372df5

Please sign in to comment.