Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
jajbshjahavahh
GitHub Repository: jajbshjahavahh/Gojo-Satoru
Path: blob/master/node_modules/@protobufjs/inquire/tests/index.js
2593 views
1
var tape = require("tape");
2
3
var inquire = require("..");
4
5
tape.test("inquire", function(test) {
6
7
test.equal(inquire("buffer").Buffer, Buffer, "should be able to require \"buffer\"");
8
9
test.equal(inquire("%invalid"), null, "should not be able to require \"%invalid\"");
10
11
test.equal(inquire("./tests/data/emptyObject"), null, "should return null when requiring a module exporting an empty object");
12
13
test.equal(inquire("./tests/data/emptyArray"), null, "should return null when requiring a module exporting an empty array");
14
15
test.same(inquire("./tests/data/object"), { a: 1 }, "should return the object if a non-empty object");
16
17
test.same(inquire("./tests/data/array"), [ 1 ], "should return the module if a non-empty array");
18
19
test.end();
20
});
21
22