diff options
Diffstat (limited to 'frontend-old/node_modules/@protobufjs/inquire/tests')
5 files changed, 24 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/data/array.js b/frontend-old/node_modules/@protobufjs/inquire/tests/data/array.js new file mode 100644 index 0000000..96627c3 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/data/array.js @@ -0,0 +1 @@ +module.exports = [1];
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyArray.js b/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyArray.js new file mode 100644 index 0000000..0630c8f --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyArray.js @@ -0,0 +1 @@ +module.exports = [];
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyObject.js b/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyObject.js new file mode 100644 index 0000000..0369aa4 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/data/emptyObject.js @@ -0,0 +1 @@ +module.exports = {};
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/data/object.js b/frontend-old/node_modules/@protobufjs/inquire/tests/data/object.js new file mode 100644 index 0000000..3226d44 --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/data/object.js @@ -0,0 +1 @@ +module.exports = { a: 1 };
diff --git a/frontend-old/node_modules/@protobufjs/inquire/tests/index.js b/frontend-old/node_modules/@protobufjs/inquire/tests/index.js new file mode 100644 index 0000000..7d6496f --- /dev/null +++ b/frontend-old/node_modules/@protobufjs/inquire/tests/index.js @@ -0,0 +1,20 @@ +var tape = require("tape");
+
+var inquire = require("..");
+
+tape.test("inquire", function(test) {
+
+ test.equal(inquire("buffer").Buffer, Buffer, "should be able to require \"buffer\"");
+
+ test.equal(inquire("%invalid"), null, "should not be able to require \"%invalid\"");
+
+ test.equal(inquire("./tests/data/emptyObject"), null, "should return null when requiring a module exporting an empty object");
+
+ test.equal(inquire("./tests/data/emptyArray"), null, "should return null when requiring a module exporting an empty array");
+
+ test.same(inquire("./tests/data/object"), { a: 1 }, "should return the object if a non-empty object");
+
+ test.same(inquire("./tests/data/array"), [ 1 ], "should return the module if a non-empty array");
+
+ test.end();
+});
|
