{"size": 761, "ext": "js", "max_stars_repo_path": "test/stringify.js", "max_stars_repo_name": "aaditmshah/aang", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/stringify.js", "max_issues_repo_name": "aaditmshah/aang", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/stringify.js", "max_forks_repo_name": "aaditmshah/aang", "max_forks_repo_forks_event_min_datetime": "2019-11-08T08:47:19.000Z", "max_forks_repo_forks_event_max_datetime": "2019-11-08T08:47:19.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 28.1851851852, "max_line_length": 65, "alphanum_fraction": 0.579500657}
"use strict";

const assert    = require("assert").strict;
const stringify = require("../src/stringify");

describe("stringify", () => {
    it("can stringify values", () => {
        assert.strictEqual(stringify(true),  "true");
        assert.strictEqual(stringify(false), "false");
    });

    it("can stringify undefined", () => {
        assert.strictEqual(stringify(undefined), "undefined");
    });

    it("can stringify functions", () => {
        assert.strictEqual(stringify(() => {}), "function");
    });

    it("can stringify circular objects", () => {
        const object = {};
        assert.strictEqual(stringify(object), "{}");
        object.circular = object;
        assert.strictEqual(stringify(object), "circular object");
    });
});
