Files
factorio-clusterio/test/lib/helpers.js
T
Hornwitser 24397b75cc Prefix clusterio/lib imports with lib
Use lib* prefix for the modules impored from the lib package to help
distinguish them more from ordinary variables.  Fix up the naming
convention for files to be consistently lowercase_underscore for
JavaScript files.
2020-10-23 21:22:43 +02:00

19 lines
594 B
JavaScript

"use strict";
const assert = require("assert").strict;
const libHelpers = require("@clusterio/lib/helpers");
describe("lib/helpers", function() {
describe("basicType()", function() {
it("should return the expected values", function() {
assert.equal(libHelpers.basicType("s"), "string");
assert.equal(libHelpers.basicType(null), "null");
assert.equal(libHelpers.basicType(undefined), "undefined");
assert.equal(libHelpers.basicType([1, 2]), "array");
assert.equal(libHelpers.basicType(7), "number");
assert.equal(libHelpers.basicType({ a: 1 }), "object");
});
});
});