|
32 | 32 |
|
33 | 33 |
|
34 | 34 |
|
35 | | -var googleProtobuf = require('google-protobuf'); |
36 | | -var asserts = require('closure_asserts_commonjs'); |
37 | | -var global = Function('return this')(); |
| 35 | +const googleProtobuf = require('google-protobuf'); |
| 36 | +const global = Function('return this')(); |
38 | 37 |
|
39 | | -// Bring asserts into the global namespace. |
40 | | -googleProtobuf.object.extend(global, asserts); |
41 | | - |
42 | | -var test9_pb = require('./protos/test9_pb'); |
43 | | -var test10_pb = require('./protos/test10_pb'); |
| 38 | +const test9_pb = require('./protos/test9_pb'); |
| 39 | +const test10_pb = require('./protos/test10_pb'); |
44 | 40 |
|
45 | 41 | describe('Strict test suite', function() { |
46 | 42 | it('testImportedMessage', function() { |
47 | | - var simple1 = new test9_pb.jspb.exttest.strict.nine.Simple9() |
48 | | - var simple2 = new test9_pb.jspb.exttest.strict.nine.Simple9() |
49 | | - assertObjectEquals(simple1.toObject(), simple2.toObject()); |
| 43 | + const simple1 = new test9_pb.jspb.exttest.strict.nine.Simple9() |
| 44 | + const simple2 = new test9_pb.jspb.exttest.strict.nine.Simple9() |
| 45 | + expect(simple1.toObject()).toEqual(simple2.toObject()); |
50 | 46 | }); |
51 | 47 |
|
52 | 48 | it('testGlobalScopePollution', function() { |
53 | | - assertObjectEquals(global.jspb.exttest, undefined); |
| 49 | + expect(global.jspb.exttest).toBeUndefined(); |
54 | 50 | }); |
55 | 51 |
|
56 | 52 | describe('with imports', function() { |
57 | 53 | it('testImportedMessage', function() { |
58 | | - var simple1 = new test10_pb.jspb.exttest.strict.ten.Simple10() |
59 | | - var simple2 = new test10_pb.jspb.exttest.strict.ten.Simple10() |
60 | | - assertObjectEquals(simple1.toObject(), simple2.toObject()); |
| 54 | + const simple1 = new test10_pb.jspb.exttest.strict.ten.Simple10() |
| 55 | + const simple2 = new test10_pb.jspb.exttest.strict.ten.Simple10() |
| 56 | + expect(simple1.toObject()).toEqual(simple2.toObject()); |
61 | 57 | }); |
62 | 58 |
|
63 | 59 | it('testGlobalScopePollution', function() { |
64 | | - assertObjectEquals(global.jspb.exttest, undefined); |
| 60 | + expect(global.jspb.exttest).toBeUndefined(); |
65 | 61 | }); |
66 | 62 | }); |
67 | 63 | }); |
0 commit comments