wildfire chat server source initial submit

This commit is contained in:
heavyrain2012
2019-03-16 17:04:23 +08:00
parent e59217bd10
commit cab3ca0916
1466 changed files with 528862 additions and 15919 deletions
+27
View File
@@ -0,0 +1,27 @@
var tape = require("tape");
var protobuf = require("..");
tape.test("common types", function(test) {
protobuf.common("google/protobuf/foo.proto", {
nested: {
google: {
nested: {
protobuf: {
nested: {
Foo: {
fields: {}
}
}
}
}
}
}
});
test.ok(protobuf.common["google/protobuf/foo.proto"], "should expose custom definitions");
test.same(protobuf.common.get("google/protobuf/any.proto"), protobuf.common["google/protobuf/any.proto"], "should also get() any definition");
test.equal(protobuf.common.get("google/protobuf/doesntexist.proto"), null, "should return null from get() if there is no such definition");
test.end();
});