<commit_before>"use strict";

const chai = require("chai");
const should = chai.should();
const expect = chai.expect;

const objectify = require("../dist");

return describe("Objectify", function () {


  const type = "Dog";
  const rawObject = {
    "name": "Jennifer",
    "age": 10
  };
  let object;

  it("converts a raw object into an object", function (done) {
    let newObject = objectify.fromRaw(type, rawObject);
    object = newObject;
    return done(typeof object === type);
  });

  it("converts an object into a raw object", function (done) {
    let newRawObject = objectify.toRaw(type, object);
    expect(newRawObject).to.deep.equal(rawObject);
    return done();
  });

  it("makes an object", function (done) {
    let newObject = objectify.factory(type).make(rawObject.name, rawObject.age);
    return done(typeof newObject === type);
  });


  describe("creepers", function () {

    let creeper = objectify.factory("Creeper").make("Test Autochirp", "Autochirp", ["keyword 1", "keyword 2", "keyword 3"]);
    let creeperAction = objectify.factory("CreeperAction").make("Reply");<commit_msg>done(expression) doesn't actually work; use expect + constructor.name to get TypeScript object name in vanilla JavaScript (tests).<commit_after>"use strict";

const chai = require("chai");
const should = chai.should();
const expect = chai.expect;

const objectify = require("../dist");

return describe("Objectify", function () {


  const type = "Dog";
  const rawObject = {
    "name": "Jennifer",
    "age": 10
  };
  let object;

  it("converts a raw object into an object", function (done) {
    let newObject = objectify.fromRaw(type, rawObject);
    object = newObject;
    expect(newObject.constructor.name).to.equal(type);
    return done();
  });

  it("converts an object into a raw object", function (done) {
    let newRawObject = objectify.toRaw(type, object);
    expect(newRawObject).to.deep.equal(rawObject);
    return done();
  });

  it("makes an object", function (done) {
    let newObject = objectify.factory(type).make(rawObject.name, rawObject.age);
    expect(newObject.constructor.name).to.equal(type);
    return done();
  });


  describe("creepers", function () {

    let creeper = objectify.factory("Creeper").make("Test Autochirp", "Autochirp", ["keyword 1", "keyword 2", "keyword 3"]);
    let creeperAction = objectify.factory("CreeperAction").make("Reply");
{'fraction_non_alphanumeric': 0.15586034912718205, 'fraction_numerical': 0.004156275976724855, 'mean_word_length': 4.198704103671706, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1721481', 'n_tokens_mistral': 770, 'n_tokens_neox': 737, 'n_words': 196}