mirror of
https://github.com/protobufjs/protobuf.js.git
synced 2026-01-18 16:14:40 +00:00
16 lines
289 B
JavaScript
16 lines
289 B
JavaScript
"use strict";
|
|
|
|
var newSuite = require("./suite");
|
|
|
|
var protobuf = require("..");
|
|
|
|
var Root = protobuf.Root;
|
|
var root = protobuf.loadSync("tests/data/test.proto");
|
|
var json = JSON.stringify(root);
|
|
|
|
newSuite("fromJSON")
|
|
.add("Root.fromJSON", function() {
|
|
Root.fromJSON(json);
|
|
})
|
|
.run();
|