Files
factorio-clusterio/test/lib/helpers.js
T
Hornwitser 65494a0a91 Move basicType to lib/helpers
Move the basicType function from the config lib to a shared helpers lib.
2020-04-03 20:51:28 +02:00

18 lines
620 B
JavaScript

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