Commit 84ba3e8e963a6d6e795d80f49375060aef82805b
fix tests
Norton Wang committed on 4/27/2018, 5:06:53 PMParent: a3edc2a316c77976c2fdd490b0c132e831262e48
Files changed
tests/index.js | changed |
tests/index.js | ||
---|---|---|
@@ -77,14 +77,14 @@ | ||
77 | 77 … | gas: 100 |
78 | 78 … | }), |
79 | 79 … | Buffer.from([1, 2, 3, 4]) |
80 | 80 … | ] |
81 | - const json = utils.toJSON(obj) | |
81 … | + const jsonFull = utils.toJSON(obj) | |
82 … | + t.deepEquals(JSON.stringify(jsonFull), '[{"@ModuleRef":{"id":"0x01","exports":{"name":["i32"]}}},{"@FunctionRef":{"actorID":"0x01","private":false,"name":"main","gas":100,"params":["i32"]}},"0x01020304"]') | |
83 … | + | |
84 … | + const json = utils.toJSON(obj, false) | |
82 | 85 … | t.deepEquals(JSON.stringify(json), '[{"@ModuleRef":{"id":"0x01"}},{"@FunctionRef":{"actorID":"0x01","private":false,"name":"main","gas":100}},"0x01020304"]') |
83 | 86 … | |
84 | - const jsonFull = utils.toJSON(obj, true) | |
85 | - t.deepEquals(JSON.stringify(jsonFull), '[{"@ModuleRef":{"id":"0x01","exports":{"name":["i32"]}}},{"@FunctionRef":{"actorID":"0x01","private":false,"name":"main","gas":100,"params":["i32"]}},"0x01020304"]') | |
86 | - | |
87 | 87 … | const newObj = [ |
88 | 88 … | new objects.ModuleRef(undefined, id), |
89 | 89 … | new objects.FunctionRef({ |
90 | 90 … | identifier: [false, 'main'], |
Built with git-ssb-web